Changing SOAP message

Hi,
I have a problem with the SOAP messages sent by the Oracle BPEL Process manager and wondered if someone could help. When I recieve a reply from a process it always comes back in this format:
<envelope>
<head/>
<body>
</body>
</envelope>
The problem is there is only one head tag which is confusing the parser that Im using as it expects both the opening and closing tags. Is there any way I can access the message and change this?

Thanks, I tried to do what you suggested before but it didnt do what I wanted it to. I know that it is valid XML but I am calling it from the JSR 172 implementation on J2ME which requires a pair of tags. I will go back and try it again just in case.
If this doesnt work however does anyone know if it is possible to manipulate the messages directly. Im getting desperate now.
Clive

Similar Messages

  • ADF Web Services 11g - how to change SOAP message

    Hey,
    Can I affect on SOAP structure?
    When we call web service, next soap message is generated:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl"; xmlns:ns1="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl/types/"; xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header/>
    <env:Body>
    <ns:unos>
    <ppol>
    <ns1:kratkiopis/>
    <ns1:premijado/>
    <ns1:sifraklauzule/>
    <ns1:datumpocetka/>
    </ppol>
    <res_out>
    <ns1:kratkiopis ns2:nil="true"/>
    <ns1:premijado ns2:nil="true"/>
    <ns1:sifraklauzule ns2:nil="true"/>
    <ns1:datumpocetka ns2:nil="true"/>
    <ns1:vinkulacije ns2:nil="true"/>
    </res_out>
    </ns:unos>
    </env:Body>
    </env:Envelope>
    and we get next error:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server</faultcode>
    <faultstring>BEA-380001: Internal Server Error</faultstring>
    <detail>
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380001</con:errorCode>
    <con:reason>Internal Server Error</con:reason>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    We send next SOAP message and then everything works fine (just removed ns1):
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl"; xmlns:ns1="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl/types/"; xmlns:ns2="http://www.w3.org/2001/XMLSchema-instance">
    <env:Header/>
    <env:Body>
    <ns:unos>
    <ppol>
    <kratkiopis/>
    <premijado/>
    <sifraklauzule/>
    <datumpocetka/>
    </ppol>
    <res_out>
    <kratkiopis ns2:nil="true"/>
    <premijado ns2:nil="true"/>
    <sifraklauzule ns2:nil="true"/>
    <datumpocetka ns2:nil="true"/>
    <vinkulacije ns2:nil="true"/>
    </res_out>
    </ns:unos>
    </env:Body>
    </env:Envelope>
    But I don't know how can we affect on SOAP message? I don't see any parameter or something what can I set to change SOAP message...
    Tnx.

    And when we call web service from proxy classes, then different SOAP message was sent , and that SOAP message is ok, too:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Body>
    <ns3:unos xmlns:ns3="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl" xmlns:ns2="http://hr/crosig/ws/osigurateljnidokument/OsigurateljniDokument.wsdl/types/">
    <ppol>
    <ns2:kratkiopis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:premijado xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:sifraklauzule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:datumpocetka xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <res_out>
    <ns2:kratkiopis xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:premijado xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:sifraklauzule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    <ns2:datumpocetka xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
    </res_out>
    </ns3:unos>
    </S:Body>
    </S:Envelope>

  • Change SOAP message structure

    Hi,
    We have SOAP adapter sending attachements but as these are always added outside SOAP structure the client needs to have them inside the soap structure.
    They have their own soap structure like below but how can we change this structure and add the attachments in it?
    Finally the structure should be like this :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:
    <SOAP-ENV:Header>
    <Q-ENV:QHeader xmlns:Q-ENV="http://www.xxx.com/soap/">
    </Q-ENV:QHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <Q-ENV:QBody xmlns:Q-ENV="http://www.xxx.com/soap/">
    </Q-ENV:QBody>
    <Q-ENV:QAttachment xmlns:Q-ENV="http://www.xxx.com/soap/">
    </Q-ENV:QAttachment>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    where bold values are specific structures to be inserted inside SOAP message.
    Best Regards,
    Laurent.

    Hello Abhishek,
    Actually this problem has already been resolved.
    The solution was to uncheck 'Do not use soap envelope' and to change the xsd structure with a new defined structure where the soap envelope was defined as requested by the receiver. This way the SOAP or HTTP adapter can be used the same way.
    Best regards,
    Laurent.

  • How to change SOAP Messages to include headers in Designer???

    Hi, I am trying to design a form to connect to Salesforce.com, they provide a Web service.<br />So I connected the WSDL file to the form and I get the objects correct, but I need to login to execute any function like queries, search, update etc..<br />So they provide a login call which works, it returns a sessionId and a URL,the problem is I need to send the sessionId to execute the other functions, the Salesforce documentation says that I need to set that sessionId in the Soap header, and that is where I have the problem:<br /><br />This is the login, which works correctly<br />Request Message login Call<br /><br /><?xml version="1.0" encoding="utf-8"?> <br />   <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" <br />xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://<br />www.w3.org/2001/XMLSchema"> <br />      <soap:Body> <br />         <login xmlns="urn:partner.soap.sforce.com"> <br />            <username>[email protected]</username> <br />            <password>secret</password> <br />         </login> <br />      </soap:Body> <br />   </soap:Envelope> <br /><br />Response Message login Call<br /> <br /><?xml version="1.0" encoding="UTF-8"?> <br /><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" <br />xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/<br />XMLSchema-instance"> <br /> <soapenv:Body> <br />  <loginResponse xmlns="urn:partner.soap.sforce.com"> <br />   <result> <br />    <passwordExpired>false</passwordExpired> <br />    <serverUrl>https://blitzna1.eng.salesforce.com/services/Soap/u/5.0</<br />serverUrl> <br />    <sessionId>c0l4g2lI.slq0uexTI3HIIuTTc9.wnYd0_jXlNKOSU</sessionId> <br />    <userId>00530000000cJzKAAU</userId> <br />   </result> <br />  </loginResponse> <br /> </soapenv:Body> <br /></soapenv:Envelope> <br /><br />Now I want to use that sessionId in the next calls:<br /><br />This is an example of how the client has to send a Search request call: <br /><br /><?xml version="1.0" encoding="utf-8"?> <br /><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" <br />xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://<br />www.w3.org/2001/XMLSchema"> <br />         <soap:Header> <br />            <SessionHeader xmlns="urn:partner.soap.sforce.com"> <br />               <sessionId>4I1yNabX_5FyOGOnuFO64VpRP0_jXlNKOSU</sessionId> <br />            </SessionHeader> <br />         </soap:Header> <br />         <soap:Body> <br />            <search xmlns="urn:partner.soap.sforce.com"> <br />               <searchString>find {4159017000} in phone fields returning <br />contact(id, phone, firstname, lastname), lead(id, phone, firstname, lastname), <br />account(id, phone, name)</searchString> <br />            </search> <br />         </soap:Body> <br />      </soap:Envelope> <br /><br />But in the form I have this:<br />      <DataConnection3><br />         <soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><br />            <tns:search xmlns:tns="urn:partner.soap.sforce.com"><br />               <tns:searchString/><br />            </tns:search><br />         </soap:Body><br />      </DataConnection3><br /><br />So Salesforce does not accept the call, I have tried changin it  to the sample above, but it does not appear to work<br /><br />Please help!!

    I tried using the soap object and i could include headers but I didnt finish, we dont need to do that anymore, because we are going to change the CRM,
    but the best you can do is try the Acrobat JavaScript Scripting Guide and try the SOAP and WebServices Section where they describe how to use the SOAP Object

  • Changing the value of the SOAPElement in the SOAP message

    Now another problem I encountered was of overwriting a value in the SOAP message by my value. SOAPElement interface which extends Node interface provides me the method getValue() to get the value of the node but doesnt give me any method to set any other value instead of this.
    <token xsi:type="xsd:string">token123</token>
    I want to replace the value "token123" with my value.
    Is there no provision for altering a value in the SOAP message? Is this due to security contraints?
    If yes then can we detach the same node and add a similar node with the new value. I wanted to try the same using addChildElements() method but then the problem here is how do I create a new SOAPElement in the handler as its an interface and not a class. Why I want to add a similar node is because I am having the definition of this object in the WSDL file, so if I attach the node corresponding to the parameter of the object then I would get the object populated with this value at J2EE or .net layer.
    Also I thought of adding an attribute to the same node but then since this attribute will not be defined in the WSDL, the value of this attribute will not populate the java object at the J2EE layer. Hence attribute introduction also didnt help.
    This is the userData object in the soap body:
    </q1:FetchDetailsInput><q2:UserData xmlns:q2="java:com.anthem.enb.common.data" xsi:type="q2:UserData" id="id2">
    <password xsi:type="xsd:string">12345</password>
    <token xsi:type="xsd:string">token123</token>
    <userID xsi:type="xsd:string">vikas123</userID>
    </q2:UserData>
    This is my code to extract the values from the above message:
    Iterator i = ctx.getMessage().getSOAPPart().getEnvelope().getBody().getChildElements();
    System.out.println(" i.hasNext() =" + i.hasNext());
    while (i.hasNext())
    Object obj = i.next();
    System.out.println(" obj :" + obj.getClass());
    if (obj instanceof SOAPElement)
    SOAPElement e = (SOAPElement) obj;
    System.out.println("e :" + e);
    String operationName = e.getElementName().getLocalName();
    LOG.info(CLASS_NAME + "operationName :" + operationName);
    if (operationName.equals("UserData"))
    Iterator j = e.getChildElements();
    LOG.info(CLASS_NAME + " j.hasNext() : " + j.hasNext());
    while (j.hasNext())
    Object obj2 = j.next();
    LOG.info(CLASS_NAME + " obj2 :" + obj2);
    LOG.info(CLASS_NAME + " obj2 :" + obj2.getClass());
    if (obj2 instanceof SOAPElement)
    SOAPElement eGrandChild = (SOAPElement) obj2;
    String operationName2 =
    eGrandChild.getElementName().getLocalName();
    if (operationName2.equals("userID"))
    String strPass = eGrandChild.getValue();
    LOG.info(CLASS_NAME + " strPass:" + strPass);
    else if (operationName2.equals("password"))
    String strUserID = eGrandChild.getValue();
    LOG.info(CLASS_NAME + " strUserID:" + strUserID);
    else if (operationName2.equals("token"))
    String strToken = eGrandChild.getValue();
    Please help.

    how do I create a new SOAPElement in the handler as its an interface and not a class?Here is an example:
    <example>
    MessageFactory messageFactory = MessageFactory.newInstance();
    SOAPMessage m = messageFactory.createMessage();
    SOAPEnvelope env = m.getSOAPPart().getEnvelope();
    SOAPBody body = env.getBody();
    SOAPElement fResponse =
    body.addBodyElement(env.createName("fResponse"));
    fResponse.addAttribute(env.createName("encodingStyle"),
    "http://schemas.xmlsoap.org/soap/encoding/");
    SOAPElement result =
    fResponse.addChildElement(env.createName("result"));
    result.addTextNode("test");
    ctx.setMessage(m);
    </example>
    Jong

  • External WebService call from CAF Core returns Invalid soap message

    I am trying to perform the very simple action of calling a WebService from a CAF Core app service.
      1. I imported the WS (Axis Web service running on NW 2004s SP9 server) with WSDL (option 2 on import external service page).
      2. I then assembled the call in an app service method and invoke it.
      3. I made sure to configure the end point for the service and the method using the External Service configuration.
    When I execute the CAF core method using a simple Callable Object test client, I get the following error:
    com.sap.caf.mp.base.exception.EngineException: Invalid soap message received
         at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.processComplexTypeMode(SOAPToMessageValueConverter.java:290)
         at com.sap.caf.mp.core.data.service.manager.wsdl11.SOAPToMessageValueConverter.generateComplexTypeValue(SOAPToMessageValueConverter.java:179)
         at
    truncated.
    I have also captured the XML request/reponse trace using tcpmon :
    REQUEST:
    POST /NWTestExpressWAR/services/TestExpressService HTTP/1.1
    Host: 192.168.99.120:8078
    Content-Type: text/xml; charset=UTF-8
    Content-Length: 348
    SOAPAction: http://www.testsys.com/TestExpressService/getAvailableModels
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body><ns1:GetAvailableModels xmlns:ns1="http://www.testsys.com/TestExpressService"/></SOAP-ENV:Body></SOAP-ENV:Envelope>
    RESPONSE:
    HTTP/1.1 200 OK
    Server: SAP J2EE Engine/7.00
    Set-Cookie: saplb_*=(J2EE11743000)11743050; Version=1; Path=/
    Content-Type: text/xml; charset=utf-8
    Date: Mon, 04 Dec 2006 02:19:39 GMT
    Transfer-Encoding: chunked
    Set-Cookie: JSESSIONID=(J2EE11743000)ID1261187150DB11296929644926762709End; Version=1; Domain=192.168.99.120; Path=/
    1f3
    <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><GetAvailableModelsResponse xmlns="http://www.testsys.com/TestExpressService"><modelNames><name>Great Oak Manufacturing-January03 Test</name><name>PriceCheck-default</name></modelNames><errorMessagesReturn/></GetAvailableModelsResponse></soapenv:Body></soapenv:Envelope>
    0
    The only problem I can think off is that the transfer-encoding is marked as chunked which is causing the characters '1f3' and '0' to appear after and before the response and that this is causing the app to crash.
    192.168.99.120 is the server the hosts the WS. It is also a 2004s SP9 server. The client server that hosts the CAF core service is of the same configuration. 8078 is the port I redirect for tcpmon purposes.
    Could anyone shed some light on my problem?
    Thanks,
    Pratap.

    It looks like NW WS client cannot handle Transfer-encoding of chunked even though this is part of HTTP 1.1. What seems to be happening is that the NW WS client is creating a HTTP 1.1 request. The service (axis ws running on NW) seeing this is creating a HTTP 1.1 response w/ chunked encoding. However, the client cannot handle this encoding and barfs. The solution is to change the service to return a HTTP/1.0 response since NW cant handle HTTP 1.1.
    Pratap.

  • How to include XML Prolog in BPEL SOAP message.

    Hi,
    I'm using SOA Suite 11g on WebLogic and have a BPEL Process in a composite application that is calling a third party SOAP Web Service.
    Whilst it is standard for a SOAP service to not care whether or not the SOAP message includes an XML Prolog (<?xml version="1.0" encoding="utf-8"?>) this third party service rejects the message if the prolog is not included.
    Unfortunately the partner link in my BPEL process is not adding the prolog when invoking the service and I cannot get the third party service changed to accept messages without it.
    Does anyone know how I can make BPEL include the prolog in SOAP messages?
    Currently the SOAP message looks like this:-
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header/>
    <soap:Body>
    </soap:Body>
    </soap:Envelope>
    What I would like it to look like is this :-
    *<?xml version="1.0" encoding="utf-8"?>*
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header/>
    <soap:Body>
    </soap:Body>
    </soap:Envelope>
    Thanks in advance...

    Hi swigg,
    It's not the partnerlink input variable that I want to manipulate, it's the SOAP Envelope that the Partner Link generates when it is invoked.
    I know that you can manipulate the SOAP Header by adding properties to the Partnerlink but it's the Envelope that surrounds both the Header and the Body that I want to set the prolog on.
    It can be done in java and .NET (WCF) by setting a property on the SOAP Envelope class, but I can't see a way to do it for a partner link in BPEL which is a shame.
    To be honest it looks like Oracle have let me down here so I'll have to use some other technology to call this service which unfortunately plays into the hands of those that didn't think I should use Oracle's BPEL offering in the first place.
    Thanks.

  • ApplicationResponseFault with namespace longer than 60 in sync soap message

    Hi,
    we are on pi 7.0 and our scenario is a async-sync bpm. In the sync soap message, the webservice raise an application error. In the response soap message we get the following detail tag:
    <detail><ApplicationResponseFault xmlns="http://schemas.datacontract.org/2004/07/BizLayerNT.ServiceLayer.v10"><DocumentResponse xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"><Response><ResponseCode xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">BusinessReject</ResponseCode></Response></DocumentResponse></ApplicationResponseFault></detail>
    In sxi_monitor this application error isn't caught and a system error is generated.
    In the system error message we get:
    <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:393) at com.sap.aii.messaging.mo.MessageContext.setAttribute(MessageContext.java:140) at com.sap.aii.adapter.xi.ms.XIMessage.updateHeaders(XIMessage.java:4271) at com.sap.aii.adapter.xi.ms.XIMessage.getTransportHeaders(XIMessage.java:572) at com.sap.aii.af.ra.ms.impl.ServerConnectionImpl.request(ServerConnectionImpl.java:212) at
    In defaulttrace.trc we get ","<sap:ApplicationFaultMessageNamespace> is longer than 60 characters: http://schemas.datacontract.org/2004/07/BizLayerNT.ServiceLayer.v10",":
    "09/04/2009","10:22:43:421","unable to generate the header map","Error","","com.sap.aii.adapter.xi.ms.XIMessage.getHeaderMap()","sap.com/com.sap.aii.af.app","SAPEngine_Application_Thread[impl:3]_14","34103150:F:\usr\sap\TPI\DVEBMGS03\j2ee\cluster\server0\log\defaultTrace.trc","001A64317EEE005E00005F2300000A6C000472BC344957CC","com.sap.aii.adapter.xi.ms.XIMessage","","","n/a","b82f88e0992b11dea4d8001a64317eee","","0","0","","0","","","0","com.sap.aii.adapter.xi.ms.XIMessage","SAPEngine_Application_Thread[impl:3]_14","","J2EE_GUEST",
    "09/04/2009","10:22:43:421","<sap:ApplicationFaultMessageNamespace> is longer than 60 characters: http://schemas.datacontract.org/2004/07/BizLayerNT.ServiceLayer.v10","Error","","com.sap.aii.messaging.mo.xmb.XMBErrorHeader.marshal(XMLWriter)","sap.com/com.sap.aii.af.app","SAPEngine_Application_Thread[impl:3]_14","34103150:F:\usr\sap\TPI\DVEBMGS03\j2ee\cluster\server0\log\defaultTrace.trc","001A64317EEE005E00005F2200000A6C000472BC34495771","com.sap.aii.messaging.mo.xmb.XMBErrorHeader","http://schemas.datacontract.org/2004/07/BizLayerNT.ServiceLayer.v10,","http://schemas.datacontract.org/2004/07/BizLayerNT.ServiceLayer.v10,","n/a","b82f88e0992b11dea4d8001a64317eee","","0","0","","1","","","0","com.sap.aii.messaging.mo.xmb.XMBErrorHeader","SAPEngine_Application_Thread[impl:3]_14","","J2EE_GUEST",
    "09/04/2009","10:22:43:421","Could not process message from 192.168.130.21 due to java.lang.NullPointerException.","Error","","com.sap.aii.af.ra.ms.impl.core.transport.http.MessagingServlet.doPost(HttpServletRequest, HttpServletResponse)","sap.com/com.sap.aii.af.ms.app","SAPEngine_Application_Thread[impl:3]_55","34103150:F:\usr\sap\TPI\DVEBMGS03\j2ee\cluster\server0\log\defaultTrace.trc","001A64317EEE0083000072F700000A6C000472BC344955F3","com.sap.aii.af.ra.ms.impl.core.transport.http.MessagingServlet","192.168.130.21,java.lang.NullPointerException,","192.168.130.21,java.lang.NullPointerException,","SAPDES_TPI_34103150","1d72b100992c11dec67f001a64317eee","PIISUSER","0","0","","1","","","15337","com.sap.aii.af.ra.ms.impl.core.transport.http.MessagingServlet","SAPEngine_Application_Thread[impl:3]_55","","PIISUSER",
    "09/04/2009","10:22:43:421","The SAP XI Adapter Framework Messaging Service caught an exception during rendering an XML Message. Details can be found in the trace file for Location com.sap.aii.messaging.mo.xmb. Action: Please contact SAP Support and provide the trace file.","Error","/Applications/ExchangeInfrastructure/AdapterFramework/SAPLibraries/SAPXDK","com.sap.aii.messaging.mo.xmb.XMBErrorHeader.marshal(XMLWriter)","sap.com/com.sap.aii.af.app","SAPEngine_Application_Thread[impl:3]_14","34103150:F:\usr\sap\TPI\DVEBMGS03\j2ee\cluster\server0\log\defaultTrace.trc","001A64317EEE005E00005F2000000A6C000472BC3449559F","com.sap.aii.messaging.mo.xmb.XMBErrorHeader","","","n/a","b82f88e0992b11dea4d8001a64317eee","","0","0","","0","/Applications/ExchangeInfrastructure/AdapterFramework/SAPLibraries/SAPXDK","","0","com.sap.aii.messaging.mo.xmb.XMBErrorHeader","SAPEngine_Application_Thread[impl:3]_14","","J2EE_GUEST",
    So I think the problem is due to the namespace length. I'm right?
    We can't change the consumed webservice to reduce namespace length and our customer ask us to solve it in PI. Is there any way to change the namespace before to be treated and get a correct application error?
    Thanks in advance,
    Marc
    Edited by: Marc Mauri on Sep 5, 2009 12:06 PM

    Hi Neetesh,
    we developed our own adapter module. We use it in our receiver soap adapter, module tab, before and after the standard module sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean.
    In this audit log secuence you can see that the problem seems not to be solved, because the error is triggered when processing response message inside adapter module sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean, so our module is not called and the problem remains.
    2009-09-22 19:06:41 Success Message successfully received by messaging system. Profile: XI URL: http://sapdes:50300/MessagingSystem/receive/AFW/XI Credential (User): PIISUSER
    2009-09-22 19:06:41 Success The message status set to DLNG.
    2009-09-22 19:06:41 Success Delivering to channel: CC_WS_DOS
    2009-09-22 19:06:41 Success MP: Entering module processor
    2009-09-22 19:06:41 Success MP: Processing local module *localejbs/AM_OWN_MODULE*
    2009-09-22 19:06:41 Success GetHostName: Module called
    2009-09-22 19:06:41 Warning Inside my own adapter Module <-- THIS IS A TRACE MESSAGE CODED INSIDE OUR MODULE
    2009-09-22 19:06:41 Success MP: Processing local module localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean 
    2009-09-22 19:06:41 Success SOAP: request message entering the adapter with user J2EE_GUEST
    2009-09-22 19:06:41 Success SOAP: Web Services Security processing...
    2009-09-22 19:06:41 Success SOAP: apply Web Services Security...
    2009-09-22 19:06:41 Success SOAP: Web Services Security applied.
    2009-09-22 19:06:42 Success SOAP: completed the processing
    2009-09-22 19:06:42 Success SOAP: continuing to response message 4d2c88e0-a79a-11de-9ffa-001a64317eee
    2009-09-22 19:06:42 Error SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault <----
    THIS ERROR IS DUE TO NAMESPACE LENGHT (WE CAN SEE THIS ERROR IN DEFAULT_TRACE.LOG)
    2009-09-22 19:06:42 Success MP: Processing local module localejbs/AM_OWN_MODULE
    2009-09-22 19:06:42 Success MP: Leaving module processor
    2009-09-22 19:06:43 Success The message was successfully delivered to the application using connection SOAP_http://sap.com/xi/XI/System. 2009-09-22 19:06:43 Success The message status set to DLVD.
    Any suggestion?
    Thanks in advance,

  • Outbound SOAP Message with Attachment

    The requirement is to invoke a web service by sending attachments in the outbound SOAP message. The attachment body needs to be assigned in the message flow, using an element E1 extracted from the message incoming into the flow.
    I am trying to use attachments variable to set content-type (text/xml) and body using E1. However, these are not getting assigned to attachments variable, as seen by logging the variable.
    I was told that $attachments cannot be changed inside the flow (it is marked black in the console unlike the header and body that are marked green). If that is the case, how do we invoke services using attachments from a message flow?
    Any pointers would be appreciated.

    Hi,
    A SOAP message may need to be transmitted together with attachments of various sorts, ranging from facsimile images of legal documents to engineering drawings. Such data are often in some binary format. For example, most images on the Internet are transmitted using either GIF or JPEG data formats. In this document we describe a standard way to associate a SOAP message with one or more attachments in their native format in a multipart MIME structure for transport.
    yes it is possible to send attachment with the SOAP.
    SOAP Message Packages
    A "SOAP message package" contains a primary SOAP 1.1 message. It may also contain additional entities that are not lexically within the SOAP message but are related in some manner. These entities may contain data in formats other than XML. The primary SOAP 1.1 message in a message package may reference the additional entities. Such additional entities are often informally referred to as "attachments." This section describes how to construct SOAP message packages and how SOAP processors will process them.
    A SOAP message package is constructed using the Multipart/Related media type, which is defined in RFC 2387. The rules for the construction of SOAP message packages are as follows:
    The primary SOAP 1.1 message must be carried in the root body part of the Multipart/Related structure. Consequently the type parameter of the Multipart/Related media header will always equal the Content-Type header for the primary SOAP 1.1 message, i.e., text/xml.
    The MIME Multipart/Related encapsulation of a SOAP message is semantically equivalent to a SOAP protocol binding in that the SOAP message itself is not aware that it is being encapsulated. That is, there is nothing in the primary SOAP message proper that indicates that the SOAP message is encapsulated .
    For more details you can refer these links
    http://www.w3.org/TR/SOAP-attachments
    http://www.w3.org/TR/soap12-af/
    regards
    Aashish Sinha
    PS : reward points if helpful

  • How to view the SOAP message in a web service call + Urgent

    Hi All,
    Iam trying to test a web service call(Iam using CXF). But I need to view SOAP message sent to web service or need to debug the web service call. Please help me on this regard with example.

    Yes. to find any tcp monitor, define a listen port number, task host and port number, changing your request to listen post, then you can monitor TCP/IP like
    HTTP/1.1 200 OK
    Set-Cookie: JSESSIONID=7A00BD65EF7516AD8947359A25C4D98B; Path=/ComponentName
    Content-Type: text/xml;charset=utf-8
    Date: Wed, 20 Oct 2004 15:45:03 GMT
    Server: Apache-Coyote/1.1
    Connection: close
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:testObjectResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:ComponentName">
    <testObjectReturn href="#id0"/>
    </ns1:testObjectResponse>
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:MyObject" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:ComponentName">
    <name xsi:type="xsd:string">Set Name</name>
    <value xsi:type="xsd:string">set Value</value>
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>
    Lixin

  • Header missing in SOAP message header (SAP XI Extension)

    Hi Experts,
    We are implementing interface MasterDataUpdateConfirmation_Out between 2 SAP ERP systems. The middleware is SAP PI.
    SAP PI team requested a change in this interface Stack - Replace Stack ABAP by Stack Java. The changes were made.
    However, now we get an error in the interface in the SAP ERP sender system, but the message arrives to SAP PI where is processed without errors and also arrives to SAP ERP receive system and the message is also processes without errors.
    The error we have in XML message in SAP ERP sender system is:
    XML element {http://schemas.xmlsoap.org/soap/envelope/}Header missing in
    SOAP message header (SAP XI Extension)
    Exception of class CX_XMS_SYSERR_PARSER
    Can anyone please help us? We have no ideia what to do.
    Thanks in advance,
    RS

    Hi again,
    I don't know if it is important, but the communication is asynchronous and the sender system is SAP ECC 6.0.
    Thanks!

  • WLS 7.0 sp2 - Servlet Problems with SOAP messages

              I'm using Weblogic 7.0 SP2 and trying to create a Servlet to receive SOAP wrapped
              XML messages. I'm getting the following error. Is this a problem with WLS7.0sp2's
              support of JAXM? The System.out.println's indicate I have successfully received
              the incoming SOAP request and then successfully formatted the SOAP response, but
              upon returning saving the response it appears to blow up. Does anyone have any
              suggestions?
              I need to do the following in a servlet:
              - receive an incoming SOAP request with an embedded XML message
              - perform some processing
              - return a SOAP response with an embedded XML message
              Should I be using JAXM? Or can I do this same task easily with JAX-RPC?
              <Feb 24, 2004 4:10:42 PM AST> <Error> <HTTP> <101017> <[ServletContext(id=260434
              7,name=isd.war,context-path=)] Root cause of ServletException
              java.lang.Error: NYI
              at weblogic.webservice.core.soap.SOAPMessageImpl.saveRequired(SOAPMessag
              eImpl.java:360)
              at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
              (ServletStubImpl.java:1058)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:401)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:306)
              at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
              n.run(WebAppServletContext.java:5445)
              at weblogic.security.service.SecurityServiceManager.runAs(SecurityServic
              eManager.java:780)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              rvletContext.java:3105)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              pl.java:2588)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
              >
              I've stripped the code down so that all it does is verifies the incoming SOAP/XML
              request and creates a hard-coded response... be gentle... I'm a novice at this
              import javax.xml.soap.*;
              import javax.servlet.*;
              import javax.servlet.http.*;
              // import javax.xml.transform.*;
              import java.util.*;
              import java.io.*;
              public class RegisterServlet extends HttpServlet
              static MessageFactory fac = null;
              static
              try
              fac = MessageFactory.newInstance();
              catch (Exception ex)
              ex.printStackTrace();
              public void init(ServletConfig servletConfig) throws ServletException
              super.init(servletConfig);
              public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
              IOException
              try
              System.out.println("** Note: doPost() Entering req = " + req);
              // Get all the headers from the HTTP request
              MimeHeaders headers = getHeaders(req);
              // Get the body of the HTTP request
              InputStream is = req.getInputStream();
              // Now internalize the contents of a HTTP request
              // and create a SOAPMessage
              SOAPMessage msg = fac.createMessage(headers, is);
              System.out.println("** Note: doPost() Step A");
              SOAPMessage reply = null;
              reply = onMessage(msg);
              System.out.println("** Note: doPost() Step B reply = " + reply);
              if (reply != null)
              * Need to call saveChanges because we're
              * going to use the MimeHeaders to set HTTP
              * response information. These MimeHeaders
              * are generated as part of the save.
              if (reply.saveRequired())
              System.out.println("** Note: doPost() Step C reply.saveRequired()");
              reply.saveChanges();
              resp.setStatus(HttpServletResponse.SC_OK);
              putHeaders(reply.getMimeHeaders(), resp);
              // Write out the message on the response stream
              OutputStream os = resp.getOutputStream();
              System.out.println("** Note: doPost() Step D os = " + os);
              reply.writeTo(os);
              os.flush();
              else
              resp.setStatus(HttpServletResponse.SC_NO_CONTENT);
              catch (Exception ex)
              throw new ServletException("** Error: SAAJ POST failed: " + ex.getMessage());
              static MimeHeaders getHeaders(HttpServletRequest req)
              Enumeration enum = req.getHeaderNames();
              MimeHeaders headers = new MimeHeaders();
              while (enum.hasMoreElements())
              String headerName = (String)enum.nextElement();
              String headerValue = req.getHeader(headerName);
              StringTokenizer values =
              new StringTokenizer(headerValue, ",");
              while (values.hasMoreTokens())
              headers.addHeader(headerName,
              values.nextToken().trim());
              return headers;
              static void putHeaders(MimeHeaders headers, HttpServletResponse res)
              Iterator it = headers.getAllHeaders();
              while (it.hasNext())
              MimeHeader header = (MimeHeader)it.next();
              String[] values = headers.getHeader(header.getName());
              if (values.length == 1)
              res.setHeader(header.getName(),
              header.getValue());
              else
              StringBuffer concat = new StringBuffer();
              int i = 0;
              while (i < values.length)
              if (i != 0)
              concat.append(',');
              concat.append(values[i++]);
              res.setHeader(header.getName(), concat.toString());
              // This is the application code for handling the message.
              public SOAPMessage onMessage(SOAPMessage message)
              SOAPMessage replymsg = null;
              try
              System.out.println("** Note: OnMessage() Entering msg = " + message);
              //Extract the ComputerPart element from request message and add to reply SOAP
              message.
              SOAPEnvelope reqse = message.getSOAPPart().getEnvelope();
              SOAPBody reqsb = reqse.getBody();
              //System.out.println("** Note: OnMessage() Step B");
              System.out.println("** Note: OnMessage () Step A Soap Request Message Body = "
              + reqsb);
              //Create a reply mesage from the msgFactory of JAXMServlet
              System.out.println("** Note: OnMessage () Step B");
              replymsg = fac.createMessage();
              SOAPPart sp = replymsg.getSOAPPart();
              SOAPEnvelope se = sp.getEnvelope();
              SOAPBody sb = se.getBody();
              System.out.println("** Note: OnMessage () Step C Soap Reply Before Message Body
              = " + sb);
              se.getBody().addBodyElement(se.createName("RegisterResponse")).addChildElement(se.createName("ErrorCode")).addTextNode("000");
              System.out.println("** Note: OnMessage () Step D Soap Reply After Message Body
              = " + sb);
              replymsg.saveChanges();
              System.out.println("** Note: OnMessage() Exiting replymsg = " + (replymsg));
              catch (Exception ex)
              ex.printStackTrace();
              return replymsg;
              

    Michael,
    I got the same error on WLS8.1/Win2K professional and apache FOP (old version).
    After digging into the WLS code and FOP(old version). i found the conflict happens
    on
    the "org.xml.sax.parser" system property. In WLS code, they hard coded like the
    following when startup weblogic server:
    System.setProperty("org.xml.sax.parser", "weblogic.xml.jaxp.RegistryParser");
    But the FOP code try to use the "org.xml.sax.parser" system property to find the
    sax parser then conlict happens.
    Here is the response from BEA support :
    "I consulted with our developers regarding the question of whether we can change
    the hard-coded value for the java system property: org.xml.sax.parser by using
    a configuration parameter and I found that unfortunately there is no specific
    setting to change the value. As you had mentioned in your note the org.xml.sax.parser
    system property can be changed programmatically in your application code."
    I solve my problem by using newer apache FOP (it never use the system property:org.xml.sax.parser
    any more) and XML Registy for WLS8.1.
    Good luck.
    David Liu
    Point2 Technologies Inc.
    "p_michael" <[email protected]> wrote:
    >
    Help.
    When we migrated from WLS 6.1 to WLS 7.0 SP2 when encountered a problem
    with XML
    parsing that did not previously exist.
    We get the error "weblogic.xml.jaxp.RegistryParser is not a SAX driver".
    What does this mean? And, what should we do about it.
    p_michael

  • Monitoring incoming SOAP messages

    Dear all,
    I configured a SOAP scenario and provided the customer the URL, but the messages did not arrived our PI System.
    After an analysis I think I configured the CC wrong. I set the adapter engine to Central AE instead of our AAE that is
    also used in the Web Service URL.
    But even after changing it, the message does not arrive the system.
    How can I check if the message perhaps arrive the PI but did not pass caused but (probably) a wrong configuration?
    Now after changing it to AAE, will it be displayed in DefaultTrace in NWA? I couldn't found there anything.
    Regards
    Chris

    Hi,
    Try XPI inspector to monitor incoming SOAP message. You will get exact error if any.
    Have a look to below blog -
    Sender SOAP Adapter: HTTPS with Client Authentication
    Regards
    Aashish Sinha

  • PayPal integration using SOAP messages

    Hello,
    for a integration scenario we want to call a PayPal SOAP API as described in https://www.x.com/docs/DOC-1244.
    The PayPal safety requirements are fullfilled by giving a Username, Password and Signature in the SOAP Header:
    <SOAP-ENV:Header>     
      <RequesterCredentials xmlns=u201Durn:ebay:api:PayPalAPIu201D xsi:type=u201Debl:CustomSecurityHeaderTypeu201D>          
       <Credentials xmlns=u201Durn:ebay:apis:eBLBaseComponentsu201D xsi:type=u201Debl:UserIdPasswordTypeu201D>                       
        <Username>api_username</Username>               
        <Password>api_password</Password>              
        <Signature>api_signature</Signature>               
        <Subject>authorizing_account_emailaddress</Subject>         
       </Credentials>    
      </RequesterCredentials>
    </SOAP-ENV:Header>
    I have given the three values as Adapter-Specific Message Attributes filled by UDF in Message Mapping.
    The filled values are also visible in monitoring in section DynamicConfiguration.
    SOAP Adapter: http://s3.directupload.net/file/d/2127/r8y4aywt_jpg.htm
    Monitoring: http://s5.directupload.net/file/d/2127/cqvfds35_jpg.htm
    But PayPal responded:
    Authentication/Authorization Failed
    You do not have permissions to make this API call
    My credentials are ok. I have tested it within the PayPal NVP API Tester: http://www.shopsandbox.de/PayPal/Refund/ .
    How do I have to manipulate the SOAP header for a successful SOAP API call?
    Is it necessary also to insert the nodes ?
    If yes, how?
    Thanks in advance,
    André

    Hi,
    I´ve created the whole SOAP message in Message Mapping and changed the SOAP receiver adapter sending the message without envelope. But the response is:
    ADAPTER.HTTP_EXCEPTION
    HTTP 500 Internal Server Error
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope>
    <Header>
      <RequesterCredentials>
       <Credentials>
         <Username>xxxxx</Username>
         <Password>xxxx</Password>
         <Signature>xxxxxx</Signature>
         </Credentials>
       </RequesterCredentials>
      </Header>
      <Body>
       <RefundTransactionReq>
        <RefundTransactionRequest>
         <Version>54.0</Version>
         <TransactionID>xxxxxxxxx</TransactionID>
         <InvoiceID>222222</InvoiceID>
         <RefundType>Partial</RefundType>
        <Amount>1</Amount>
        <Memo>memotext</Memo>
       </RefundTransactionRequest>
      </RefundTransactionReq>
    </Body>
    </Envelope>
    Have I missed sth?
    Thanks,
    André

  • JMS transport - weblogic changes soap:address location="jms:.. to http

    Hi,
    Please help me to configure web service to use only jms transport.
    I try to create web service that uses JMS transport.
    I started from WSDL where I placed two elements:
    <soap:binding style="document"
                   transport="http://www.openuri.org/2002/04/soap/jms" />
    and
    <soap:address location="jms://host:7041/contextPathName/serviceUriName?URI=queueName" />
    Then in web service implementation I placed following annotation:
    @WLJmsTransport(contextPath = "contextPathName", serviceUri = "serviceUriName", portName = "portName", queue = "queueName", connectionFactory = "connectionFactoryName")
    Deployment is successful but when I look at generated WSDL (Admin console) I see that weblogic has changed <soap:address location="jms:.. to <soap:address location="http....
    And when I look at monitoring I see that port is using JMS transport.
    When I try to test my service using Admin console Test client I see that the queue is not used (Admin console/monitoring/Messages total is still 0) and service uses (I suppose) http transport.

    Hi,
    Please change "http://www.openuri.org/2002/04/soap/jms" to http://www.openuri.org/2002/04/soap/jms/ for soap1.1 or http://www.openuri.org/2002/04/soap12/jms/ for soap1.2.
    There must be some mismatch between edoc and implementation.
    -LJ

Maybe you are looking for