Soap body xml different on server

Hello,
I am trying to verify a soap body string using a signature in the soap header. But am getting a slightly modified version of the soap message on the server side handler.
Here is how my client side handler soap body looks:
<n1:xyz xmlns:n1="http://localhost/edm/DocMgmtParametersRetriever">
</n1:xyz>
On the server side,
<n1:xyz xmlns:n1="http://localhost/edm/DocMgmtParametersRetriever"></n1:xyz>
The differences are:
1.There is an extra space between n1:xyz and xmlns on the client side.
2.There is a line break before </n1:xyz> on the client side which is not present on the server side.
When I add following lines of code on client side, the soap body looks the same and server is able to verify the signature.
soapBody = soapBody.replaceAll(" xmlns:"," xmlns:");
soapBody = soapBody.replaceAll("\n","");
soapBody = soapBody.replaceAll("\r\n","");
soapBody = soapBody.replaceAll("\r","");
The server is on weblogic 8.1 sp3. The webservice java client is using saaj-api.jar
Any clue as to why there is a difference?
Thank you

Welcome to the forums.
As a tip for future posts [url https://forums.oracle.com/forums/thread.jspa?threadID=2174552#9360002]2. How do I ask a question on the forums?
That said, a basic example that pulls the contents of the body out is
declare
  l_ws_rsp    XMLTYPE;
  l_body_rsp  XMLTYPE;
begin
  -- Retrieving the SOAP message
  l_ws_rsp := DHL_SOAP_RESPONSE_XMLTYPE;
  -- Extracting out the body
  SELECT xt.body_xml
    INTO l_body_rsp
    FROM XMLTable(XMLNamespaces('http://schemas.xmlsoap.org/soap/envelope/' AS "SOAP-ENV"),
                  '/SOAP-ENV:Envelope/SOAP-ENV:Body/*'
                  PASSING l_ws_rsp
                  COLUMNS
                  body_xml   XMLTYPE PATH '.') xt;
   dbms_output.put_line(l_body_rsp.getClobVal());
end;If you Google
XMLTable soap site:forums.oracle.com
you can find plenty of examples on these forums regarding how to parse a web service response.
The bigger question is, what are you going to do with the data in the response. As the example above alludes too, you can actually parse the entire WS response with one SQL statement and return the results as one or more rows. Will you be performing PL/SQL logic on the returned results or will you simply be INSERTing them into the database for something else to use?

Similar Messages

  • How to add exactly 2 NON XML caracters at the end of a SOAP body

    Hello all I am trying to add two (and only two) extra non xml caracters "AA" at the END of a SOAP body using the JAXWS handlers as so:
    HTTP/1.1 200 OK
    Content-Type: text/xml;charset=UTF-8
    Content-Length: 131
    Content-Length: 131
    Server: Jetty(7.x.y-SNAPSHOT)
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body></SOAP-ENV:Body></SOAP-ENV:Envelope>
    AA
    The problem is that if you try to add them to the SOAP body (see code below) you get a XML Unmarshalling exception. If I add "AA" as a soap attachment I get MORE than 2 caracters after the SOAP body (which I don't want)
    Here is the my SOAPHandler code :
    @Override
    public boolean handleMessage(SOAPMessageContext mc) {
    if (Boolean.TRUE.equals(mc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY))) {
    try {
    SOAPMessage message = context.getMessage()
    String stringSoapMessage= getMsgAsString(message);
    stringSoapMessage += "ss";
    message.getSOAPPart().setContent((Source) new StreamSource(new ByteArrayInputStream(msg.getBytes())));
    message.saveChanges();
    context.setMessage(message);
    } catch (Exception e1) {
    return true;
    public String getMsgAsString(SOAPMessage message) throws SOAPException {
    String msg = null;
    try {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    message.writeTo(baos);
    msg = baos.toString();
    } catch (Exception e) {
    e.printStackTrace();
    return msg;
    so my question is this: is there any way to add exactly 2 non xml caracters at the end of the soap body using jaxws handlers ? I have spent several weeks on this so it is not an easy question...
    Thanks,
    Fred.

    Yes I have done it using CFX interceptors. But the runtime dependencies needed were too big for this particular use. I mean having to use these:
    apache/cxf/cxf-bundle/2.6.0/cxf-bundle-2.6.0.jar
    org/apache/neethi/neethi/3.0.2/neethi-3.0.2.jar                    
    wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar
    /org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar
    org/apache/ws/xmlschema/xmlschema-core/2.0.2/xmlschema-core-2.0.2.jar
    org/mortbay/jetty/jetty-util/6.0.2/jetty-util-6.0.2.jar
    org/eclipse/jetty/jetty-util/7.5.4.v20111024/jetty-util-7.5.4.v20111024.jar
    org/apache/geronimo/specs/geronimo-servlet_2.5_spec/1.1.2/geronimo-servlet_2.5_spec-1.1.2.jar
    org/apache/geronimo/specs/geronimo-javamail_1.4_spec/1.7.1/geronimo-javamail_1.4_spec-1.7.1.jar
    org/apache/geronimo/specs/geronimo-servlet_3.0_spec/1.0/geronimo-servlet_3.0_spec-1.0.jar
    org/eclipse/jetty/jetty-http/7.5.4.v20111024/jetty-http-7.5.4.v20111024.jar
    org/eclipse/jetty/jetty-server/7.5.4.v20111024/jetty-server-7.5.4.v20111024.jar
    org/eclipse/jetty/jetty-io/7.5.4.v20111024/jetty-io-7.5.4.v20111024.jar
    org/eclipse/jetty/jetty-continuation/7.5.4.v20111024/jetty-continuation-7.5.4.v20111024.jar
    to add two caracters at the end of a soap message seems like over kill. If this is the only way to do this then i'll do it this way but it just seems like the implementation of the JAXWS API in JDK 6 seems inches away from being able to do this no ?
    Thanks for the replies,
    Fred

  • Mapping Design  - SOAP body content needs to be different between test and production

    Hello,
    We are integrating with a 3rd party SOAP receiver who uses the same web service URLS for test and production.
    So to differentiate they exposed 2 web services which do the same thing but have different root and payload node names...along with account details.
    For example, for production our SOAP XML must follow pattern like:
    <Envelope>
    <Body>
    <appRequest>
    <userID>produser</userID><password>prodpwd</password>
    <appPayload>
    <?xml>
    blah blah this XML is the same between test and production
    </xml>
    </appPayload>
    etc
    But for their testing we must use:
    <Envelope>
    <Body>
    <appRequestTest>
    <userID>testuser</userID><password>testpwd</password>
    <appPayloadTest>
    <?xml>
    blah blah this XML is the same between test and production
    </xml>
    </appPayload>
    etc
    So I'm trying to think of a good way to handle this difference in one set of mappings that we can use in our 3 PI platforms Dev / Test / Prod
    Since these differences are in the SOAP Body does it need handled in mapping or is there a way to handle it in the Adapter Config which is naturally different between our environments (mapping we like to keep the same).
    What is a smart way to handle this scenario?
    Many thanks,
    Aaron

    I second Artem when he states that this is a bad design decission from the caller's side.
    However this is not gonna help you in the current situation, right?
    The problem you are facing is that by poor design the message does not have a root node which you may use to handle occurences. Let me explain further
    You would be good if prod message looked like so
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
      <appData>
       <appRequest>
       </appRequest>
      </appData>
    </soapenv:Body>
    </soapenv:Envelope>
    and test message looked like so
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
      <appData>
       <appRequestTest>
       </appRequestTest>
      </appData>
    </soapenv:Body>
    </soapenv:Envelope>
    --> Then you would have been able to specify occurence of <appRequest> and <appRequestTest> as 0..1
    So I think you have (besides what Artem already pointed out) 2 other options:
    1. activate "do not use SOAP envelope" on sender SOAP channel and then designing the data types like above
    2. Use HTTP instead of SOAP adapter and designing data types like above
    Hope I didn't miss something crucial :-)
    Cheers
    Jens

  • Adding xml fragment to SOAP body (SAAJ)

    Hi all,
    we are using SOAP (or better SAAJ) in a modular design as packaging/enveloping format for arbitrary payloads which are generated by different modules.
    How is it possible to add a xml fragment (as InputStream or DOM Node) to a SOAP Body ?
    Nick
    [email protected]

    Hi Vicky,
    I guess, we have a little misunderstanding here. The core SOAP specification defines the structure of the envelope, the "SOAP with attachments" specification extends that by defining how to add binary attachments. This is accomplished by using MIME. Every attachment is another MIMEPart, but the SOAP Envelope always has to be present as first MIMEPart. Now I don't want to add any attachments, I only want to construct a SOAP Envelope that contains arbitrary xml docs (fragments) in the body.
    Look at the example below, the tags with namespace "S" belong to the SOAP specification and are built by our SOAP layer, the tags with namespace "m" belong to some other namespace and are generated by a totally different component.
    My question was how I could add (within SAAJ) the xml fragment starting with "m:PurchaseOrder" to the envelope without having to add element by element.
    <S:Envelope>
         <S:Header>
              ...optional header tags
         </S:Header>
         <S:Body>
                    <!---from here it is a different namespace, SOAP doesn't know about PurchaseOrders>
              <m:PurchaseOrder>
                   <m:position>
                        <m:article>0815</m:article>
                        <m:description>mainboard</m:description>
                        <m:price>50</m:price>
                   </m:position>
                   <m:position>
                        <m:article>0816</m:article>
                        <m:description>cpu</m:description>
                        <m:price>100</m:price>
                   </m:position>
              </PurchaseOrder>
                    <!---from here, it is SOAP again>
         </S:Body>
    </S:Envelope>

  • Attaching xml document to SOAP body

    Hi,
    i have two question.
    Q1: Is it allowed to attach xml document (org.w3c.dom.Document) to SOAP body when sending request to web service.( I have implemented web service to accept attached xml document.)
    Q2: If it is allowed, how thoes the WSDL look like.
    Thanx,
    Alan.

    Hi,
    I am facing the same issue., I want to transform the xml proxy request to SOAP requesting that the business service expects.
    Did you manage to solve the issue, if so, can you please share your solution?
    Thanks

  • JAXB XML output as SOAP Body

    Hey,
    I currently have a psuedo webservice that pulls a string out of an http request and returns a corresponding xml document (based on a schema) to the caller. Pretty basic and it works fine. I use JAXB for the Marshalling of my objects to xml, based on the schema, so I know that my xml document is correct (well-formed and valid).
    Now, I would like to do the same thing, except as a SOAP-RPC call. I figure, for the service side, I can just wrap what I already generate in a SOAP Envelope, in response to a SOAP request. Creating the client is easy but I am having trouble with the client side. How can I simply pass an xml document as the SOAP body using Axis/JAX-RPC or whatever, instead of re-mapping to Java object, which might not guarantee the response document conforms to my schema?
    I've looked at SAAJ for this a bit, but this seems more about sending a message to a service rather than creating a response from a service....
    Any ideas?
    Mike

    Yes, it's been ten months, but have you figured out how to integrate SOAP and JAXB? I am attempting to make my SOAP client application code easy for a Java beginner to understand, so JAXB would be ideal.

  • Missing namespace prefix in the soap body

    Hello
    The soap body that is produced along with soap header for my webservice. I
    am the client talking to a server. The first piece in RED color is what
    weblogic generates to send to the client but does NOT work. The one below
    though works fine which is what I manipulated by hand to send to the
    server. I have no idea why weblogic drops the namespace prefix in the
    BODY.
    -Narahari
    The message is as shown below
    POST /FS HTTP/1.1
    Host: asgappsrv10:6211
    Content-Type: text/xml; charset=utf-8
    Connection: close
    SOAPAction: "ListDomains"
    <?xml version="1.0" encoding="utf-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    <n1:Credentials xmlns:n1="urn:criticalpath:fs:api:1.0"
    xsi:type="n1:Credentials">
    <Username xsi:type="xsd:string">admin@default</Username>
    <Password xsi:type="xsd:string">password</Password>
    <SessionId xsi:nil="true"/>
    </n1:Credentials>
    </env:Header>
    <env:Body
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <Fulfill xmlns:n2="urn:criticalpath:fs:api:1.0"
    xsi:type="n2:Fulfill">
    <Request xsi:type="xsd:string">ListDomains</Request>
    <RequestAttributes soapenc:arrayType="n2:Attribute[0]"/>
    <Async xsi:type="xsd:boolean">false</Async>
    </Fulfill>
    </env:Body>
    </env:Envelope>
    When you see the data carefully, the env:Body has the Fulfill element. But
    it does have a namespace prefix on it. This causes the call to fail. If I
    change the above segment manally to look like
    POST /FS HTTP/1.1
    Host: asgappsrv10:6211
    Content-Type: text/xml; charset=utf-8
    Connection: close
    SOAPAction: "ListDomains"
    <?xml version="1.0" encoding="utf-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <env:Header>
    <n1:Credentials xmlns:n1="urn:criticalpath:fs:api:1.0"
    xsi:type="n1:Credentials">
    <Username xsi:type="xsd:string">admin@default</Username>
    <Password xsi:type="xsd:string">password</Password>
    <SessionId xsi:nil="true"/>
    </n1:Credentials>
    </env:Header>
    <env:Body
    env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <n2:Fulfill xmlns:n2="urn:criticalpath:fs:api:1.0"
    xsi:type="n2:Fulfill">
    <Request xsi:type="xsd:string">ListDomains</Request>
    <RequestAttributes soapenc:arrayType="n2:Attribute[0]"/>
    <Async xsi:type="xsd:boolean">false</Async>
    </n2:Fulfill>
    </env:Body>
    </env:Envelope>

    Hi All,
    we are also facing the same issue, Please provide the solution if anyone knows. We are also using the SOA Suite 11g Version.

  • Write XML to the server... ? Problem !

    Hi,
    I need your help !
    I'm trying to reach the "Weather" example web service in WL 6.1.
    My aim is to write XML direct into a socket, over HTTP, and read the
    response...
    I have included the code I am using, but it is not successful for the
    moment.
    I keep getting a parse exception :
    HTTP/1.1 200 OK
    Date: Thu, 26 Jun 2003 07:57:33 GMT
    Server: WebLogic WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
    Content-Type: text/xml; charset=UTF-8
    Transfer-Encoding: Chunked
    Connection: Close
    04da
    <?xml version="1.0" ?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <soap:Fault>
    <faultcode>
    Server
    </faultcode>
    <faultstring>
    org.xml.sax.SAXException
    </faultstring>
    <detail>
    Server side error:
    org.xml.sax.SAXException: Could not find envelope element
    at weblogic.soap.codec.SoapMessage.read(SoapMessage.java:87)
    at
    weblogic.soap.server.servlet.StatelessBeanAdapter.getInputMessage(Sta
    telessBeanAdapter.java:150)
    at
    weblogic.soap.server.servlet.StatelessBeanAdapter.doPost(StatelessBea
    nAdapter.java:100)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    </detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    0000
    ============ code ===============
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class ClientSocket {
    public static void main(String args[]) throws Exception
    if (args.length != 5)
    throw new Exception("Nombre de parametres incorrect");
    String site = args[0];
    Socket sock = new Socket("localhost", 7001);
    PrintWriter out = new PrintWriter(sock.getOutputStream());
    out.println("POST /weather/weatheruri HTTP/1.1");
    out.println("Host: localhost");
    out.println("Content-Type: text/xml; charset=\"utf-8\"");
    out.println("Content-Length: nnnn");
    //out.println("SOAPAction: \"http://localhost:7001/weather/weatheruri\"");
    //out.println("SOAPAction: ");
    out.println("SOAPAction: \"Some-URI\"");
    out.println("");
    out.println("<?xml version='1.0' encoding='UTF-8'?>");
    out.println("<SOAP-ENV:Envelope
    xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
    xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
    xmlns:xsd='http://www.w3.org/1999/XMLSchema'>");
    out.println("<SOAP-ENV:Body>");
    out.println("<getTemp
    SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>");
    out.println("<message xsi:type='xsd:string'>");
    out.println("1212");
    out.println("</message>");
    out.println("</getTemp>");
    out.println("</SOAP-ENV:Body>");
    out.println("</SOAP-ENV:Envelope>");
    out.flush();
    BufferedReader in = new BufferedReader(new
    InputStreamReader(sock.getInputStream()));
    String str = null;
    while (((str = in.readLine()) != null))
    System.out.println(str);
    sock.close();

    Many thanks, Mike !!
    Mathew
    "Michael Wooten" <[email protected]> wrote in message
    news:[email protected]...
    >
    The attached Java source shows one example of how to use a Socket to senda SOAP
    message. Check it out, and see if it helps. It has some optimizations thataren't
    currently in the code you provided.
    Regards,
    Mike Wooten
    "W@p" <[email protected]> wrote:
    Hi,
    I need your help !
    I'm trying to reach the "Weather" example web service in WL 6.1.
    My aim is to write XML direct into a socket, over HTTP, and read the
    response...
    I have included the code I am using, but it is not successful for the
    moment.
    I keep getting a parse exception :
    HTTP/1.1 200 OK
    Date: Thu, 26 Jun 2003 07:57:33 GMT
    Server: WebLogic WebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529
    Transfer-Encoding: Chunked
    Connection: Close
    04da
    <?xml version="1.0" ?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <soap:Fault>
    <faultcode>
    Server
    </faultcode>
    <faultstring>
    org.xml.sax.SAXException
    </faultstring>
    <detail>
    Server side error:
    org.xml.sax.SAXException: Could not find envelope element
    at weblogic.soap.codec.SoapMessage.read(SoapMessage.java:87)
    at
    weblogic.soap.server.servlet.StatelessBeanAdapter.getInputMessage(Sta
    telessBeanAdapter.java:150)
    at
    weblogic.soap.server.servlet.StatelessBeanAdapter.doPost(StatelessBea
    nAdapter.java:100)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    </detail>
    </soap:Fault>
    </soap:Body>
    </soap:Envelope>
    0000
    ============ code ===============
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class ClientSocket {
    public static void main(String args[]) throws Exception
    if (args.length != 5)
    throw new Exception("Nombre de parametres incorrect");
    String site = args[0];
    Socket sock = new Socket("localhost", 7001);
    PrintWriter out = new PrintWriter(sock.getOutputStream());
    out.println("POST /weather/weatheruri HTTP/1.1");
    out.println("Host: localhost");
    out.println("Content-Type: text/xml; charset=\"utf-8\"");
    out.println("Content-Length: nnnn");
    //out.println("SOAPAction:
    \"http://localhost:7001/weather/weatheruri\"");
    //out.println("SOAPAction: ");
    out.println("SOAPAction: \"Some-URI\"");
    out.println("");
    out.println("<?xml version='1.0' encoding='UTF-8'?>");
    out.println("<SOAP-ENV:Envelope
    xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
    xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/'
    xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
    xmlns:xsd='http://www.w3.org/1999/XMLSchema'>");
    out.println("<SOAP-ENV:Body>");
    out.println("<getTemp
    SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>");
    out.println("<message xsi:type='xsd:string'>");
    out.println("1212");
    out.println("</message>");
    out.println("</getTemp>");
    out.println("</SOAP-ENV:Body>");
    out.println("</SOAP-ENV:Envelope>");
    out.flush();
    BufferedReader in = new BufferedReader(new
    InputStreamReader(sock.getInputStream()));
    String str = null;
    while (((str = in.readLine()) != null))
    System.out.println(str);
    sock.close();

  • Apex_web_service.make_request throws ORA-29273: HTTP request failed. How to get the soap fault XML?

    I am trying to call a web service using apex_web_service.make_request function.
    It works fine when all the parameters are correct. However, when something is wrong in the request XML, it throws an exception instead of returning the soap:fault message:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1369
    ORA-29269: HTTP server error 500 - Internal Server Error
    ORA-06512: at "APEX_040200.WWV_FLOW_WEBSERVICES_API", line 130
    ORA-06512: at line 37
    I need to get back the soap:fault and parse it to display a proper error message to the users (e.g. what was wrong with the input), yet the call throws an exception instead of returning it.
    I am trying the exact same request from soapUI and it returns me the soap:fault below:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
       <soap:Body>
          <soap:Fault>
             <soap:Code>
                <soap:Value>soap:Receiver</soap:Value>
             </soap:Code>
             <soap:Reason>
                <soap:Text xml:lang="en">Fault occurred while processing.</soap:Text>
             </soap:Reason>
             <soap:Detail>
                <ns1:RegisterFault xmlns:ns1="http://www.exchangenetwork.net/wsdl/register/1">
                   <description xmlns:ns2="http://www.exchangenetwork.net/wsdl/register/1">The security token has expired.</description>
                   <errorCode xsi:type="ns2:RegisterErrorCode" xmlns:ns2="http://www.exchangenetwork.net/wsdl/register/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">E_TokenExpired</errorCode>
                </ns1:RegisterFault>
             </soap:Detail>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>
    How do I get this back from APEX?
    Thanks!

    Hi,
       I've just run into this.
       If the webservice returns a fault, such as:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>INVALID_REQUESTER_INFO</faultstring></soap:Fault></soap:Body></soap:Envelope>
       then the user gets presented with an unfriendly error message and there's no chance to output a more friendly one.
       The response above is seen when testing the webservice, when run from the Form/Report page, we get something like:
    soap:ServerINVALID_REQUESTER_INFO
    Contact your application administrator.
    OK
       When OK button is clicked everything is rolled back and we don't even get the fault XML.
       It would be good if Apex could be optionally set to not give the unfriendly messages, so that we could code such a message ourselves.
       Unless anybody has a workaround for this, I guess that I'll have to see if I can code this in PLSQL.
    Regards,
    Chris

  • SOAP BODY data to be Put into SOAP Header

    Hi All,
    Could you kindly help me out in this issue?
    Basically our Requirement is to send the UserID and Password stored in
    the R/3 system to the 3rd Party Server as a part of the SOAP Header .
    Presently I am using a Message Interface which takes the parameters
    UserID and Password and hence its placing them in the SOAP BODY which in
    turn in resulting in Rejection of the data sent being us. So I guess we
    have to do some take out these parameters from Message Interface and
    try out something else.
    So Could you help us out in this issue since we are stuck  and hence not
    able to proceed any further.
    Here are some Details :
    Here is the extract from the XML File:
    A) Format in XI
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:DPSrequestToken xmlns:ns1="http://tempuri.org/message/">
    - <Username>
      <Username>ANYAGENT</Username>
      <Password>p2ssword</Password>
      </Username>
    - <DPSrequestToken>
      <version>1</version>
      <vendorID>0142</vendorID>
      </DPSrequestToken>
      </ns1:DPSrequestToken>
    B) The way the file needs to be sent to the 3rd party server
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header>
            <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                <wsse:UsernameToken>
                    <wsse:Username>ANYAGENT</wsse:Username>
                    <wsse:Password>p2ssword</wsse:Password>
                </wsse:UsernameToken>
            </wsse:Security>
    </SOAP-ENV:Header>
         <SOAP-ENV:Body>
              <m:DPSrequestToken xmlns:m="https://tpvs.hmrc.gov.uk/dpsauthentication">
                   <m:version>1</m:version>
                   <m:vendorID>your 4 digit vendorID</m:vendorID>
              </m:DPSrequestToken>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Basically as mentioned above
      <Username>ANYAGENT</Username>
      <Password>p2ssword</Password> ,Tokens should be sent in the SOAP
    Header which is now being sent in the Body and hence causing problems.
    Do get back to me in case you need any clarifications on this issue.
    Best Regards,
    Chandan
    Message was edited by: Chandan A C

    see this --> page 2
    HTTP Adapter error.
    Rgds

  • Java Web Service "clears" sop:Include/ from SOAP Body?

    I have a Java Web Service which processes SOAP Messages with MIME attachments. The references to the attachments are using XOP (XML-binary Optimized Packaging) specification.
    The XML Schema for the SOAP Body content imports the namespace "http://www.w3.org/2004/08/xop/include", but it is not its main target namespace. When I run the service and view the HTTP packet through HTTP Analyzer, the SOAP Envelope looks like this:
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:ns0="http://www.ACORD.org/Standards/AcordMsgSvc/1"
                  xmlns:xop="http://www.w3.org/2004/08/xop/include"
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <env:Header>
        </env:Header>
        <env:Body>
            <ac:CallRq xmlns:ac="http://www.ACORD.org/Standards/AcordMsgSvc/1">
                <ac:WorkFolder>
                    <ac:MsgFile>
                        <ac:FileId>
    <sop:Include href="cid:93609df7-d718-4801-bab9-57e3fd9cc5b5"
    xmlns:sop="http://www.w3.org/2004/08/xop/include"
    xsi:schemaLocation="http://www.w3.org/2004/08/xop/include http://www.w3.org/2004/08/xop/include"/>
    </ac:FileId>
                        <ac:FileFormatCd>text/xml</ac:FileFormatCd>
                    </ac:MsgFile>
                </ac:WorkFolder>
            </ac:CallRq>
        </env:Body>
    </env:Envelope>But when I access the java.xml.soap.SOAPMessage object in handleRequest(MessageContext) method of the Web Service's handler I get the following:
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:ns0="http://www.ACORD.org/Standards/AcordMsgSvc/1"
                  xmlns:xop="http://www.w3.org/2004/08/xop/include"
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
        <env:Header>
        </env:Header>
        <env:Body>
            <ac:CallRq xmlns:ac="http://www.ACORD.org/Standards/AcordMsgSvc/1">
                <ac:WorkFolder>
                    <ac:MsgFile>
                        <ac:FileId>
    </ac:FileId>
                        <ac:FileFormatCd>text/xml</ac:FileFormatCd>
                    </ac:MsgFile>
                </ac:WorkFolder>
            </ac:CallRq>
        </env:Body>
    </env:Envelope>As you can see, the <sop:Include/> element has disappeared.
    Does anyone has an idea why this happens?
    Thank you!
    Simeon

    Neither the simple "setter" methods work.. :(
    The php client side:
    $string="aladar";
    $client->setSample($string);
    $return = $client->getSample();
    The server side:
    public String sample;
    public String getSample() {
    return sample;
    public void setSample(String a_sample) {
    sample = a_sample;
    Any ideas?

  • GWWS_CAT:1022: SOAP Error: Invalid SOAP Body While processing Valid Soap Request

    Hi,
    I Following tuxedo version on AIX 6.1 Power 7 64 bit.
    INFO: Oracle Tuxedo, Version 10.3.0.0, 64-bit, Patch Level 095
    Service Meta Information is :
    service=StockQuote
    export=y
    servicetype=service
    tuxservice=STOCKQUOTE
    svcdescription=This service is used to demo security and xml buffer interop.
    inbuf=XML
    outbuf=XML
    param=XMLBuffer
    type=xml
    access=inout
    size=1000
    this is actually picked from salt sample packaged with version 10.3.
    Request Message:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns1="urn:salt.samples.wsdl"
    xmlns:ns2="urn:pack.samples_typedef.salt11">
    <SOAP-ENV:Body>
    <ns2:StockQuote>
    <ns2:inbuf>
    </ns2:inbuf>
    </ns2:StockQuote>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I put GWWS under tracing and found following.
    Response Messag:
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --WAKEUP-->Created
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Inbound-->Receive
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Found-->ParseHTTP
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:HTTP Parsing: Buffer length 1140 -- POST /secsapp HTTP/1.1^M
    Host: uaix4070.unix.rabobank.nl:8070^M
    User-Agent: gSOAP/2.7^M
    Content-Type: text/xml; charset=utf-8^M
    Content-Length: 437^M
    Connection: close^M
    SOAPAction: "StockQuote"^M
    ^M
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLS
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:chema"
    xmlns:ns1="urn:salt.samples.wsdl"
    xmlns:ns2="urn:pack.samples_typedef.salt11">
    <SOAP-ENV:Body>
    <ns2:StockQuote>
    <ns2:inbuf>
    </ns2:inbuf>
    </ns2:StockQuote>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:parse_header_field() return 6
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --OK-->HTTPDispatch
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:A HTTP message is received, SCO index=4095
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:Finding endpoint, soap->path is /secsapp, request_uri is /secsapp
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Post-->ParseSOAPHeader
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Default-->ParseHeaderRoot
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:A SOAP message is received, SCO index=4095
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --None-->ParseSOAPBody
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Default-->ParseBodyRoot
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --OK-->ParseBodyElement
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:Begin data transformation of request message, buffer type = XML, SCO index=4095
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Fail-->SOAPFault
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --OK-->PackSOAPBody
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --OK-->PackSOAPHeader
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Default-->WSRMHandle3
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --OK-->PackHTTP
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:SCO[4095] FSM State Transition: --Default-->Send
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:Sending HTTP Header: HTTP/1.1 500 Internal Server Error^M
    Server: gSOAP/2.7^M
    Content-Type: text/xml; charset=utf-8^M
    Content-Length: 311^M
    Connection: close^M
    ^M
    150237.uaix4070!GWWS.5767178.1046.0: TRACE:ms:Sending SOAP Message: <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>GWWS_CAT:1022: SOAP Error: Invalid SOAP Body.</faultstring></SOAP-ENV:Fault><
    /SOAP-ENV:Body></SOAP-ENV:Envelope>
    Is there something wrong with the request ? Are there known bugs with handling of Soap request in this version ?
    Thanks & Regards,
    Ajeet Tewari

    Ajeet,
    I believe that may be caused by the fact that the payload is empty (<inbuf></inbuf>). The gateway is very strict on that...
    Regards,
    Maurice

  • WTK22 JSR172Demo - missing SOAP body

    Hi,
    I tried the sample JSR172Demo provided with WTK22, with the server running on localhost. Hence the WSDL port is as below:
    location="http://localhost:8080/serverscript2/serverscript"
    The service has been verified to be running. The stubs for the client generated using the KToolbar stub generator tool. The build was successful. However when the client is run and the service is invoked the following error is displayed on the Ktoolbar console:
    java.rmi.MarshalException: Missing SOAP Body or Envelope
         at example.serverscript.connector.Interface_Stub.request(+125)
         at example.serverscript.demo.Demo.run(+23)
    Please let me know if anyone has faced a similar problem and found a solution.
    Thanks,

    I have simular problem:
    "Missing SOAP Body or Envelope exception" when I'm trying to call web-service methos through internet.
    It seems there is something wrong with my computer security settings - can't imagine what's wrong.
    With local web-server everything works fine.
    I tryed to change Security Domain to Trusted, but this doesn't helps.
    Regards

  • Extract fields from the SOAP body during mapping

    Hi all,
    I have an Abap Proxy to SOAP scenario with a main payload and an attachment. During mapping I need the reference of the attachment to store the reference in the main payload. I don't need the attachment itself.
    SOAP-Body:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Eingangs-Message
      -->
    - <SAP:Manifest xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
    - <SAP:Payload xlink:href="cid:payload-E742FF47D930DE5CE1000000C107826A @sap.com">
      <SAP:Name>MainDocument</SAP:Name>
      <SAP:Description />
      <SAP:Type>Application</SAP:Type>
      </SAP:Payload>
    - <SAP:Payload xlink:href="cid:payload-EE42FF47D930DE5CE1000000C107826A @sap.com">
      <SAP:Name>hugo.txt</SAP:Name>
      <SAP:Description />
      <SAP:Type>ApplicationAttachment</SAP:Type>
      </SAP:Payload>
      </SAP:Manifest>
    I need the attachment reference as string inside my main payload: cid:payload-EE42FF47D930DE5CE1000000C107826A @sap.com
    I wrote an user defined function to select the MessageId, but the MessageId is only part of the reference to the main payload.
    String constant;
    java.util.Map map;
    map = container.getTransformationParameters();
    constant = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
    return constant;
    Has anybody an idea to get the reference of the attachment from the SOAP body with an user defined function or an adapter module?
    Thanks and kind regards
    Frank

    Hello,
    thank you all for the information. I found a solution for my problem on the sender side. I wrote an own helper class with  the method create_attach_from_txt_withref. This method  build an attachment with an own reference and write the reference back to the payload.
    This reference will not be changed within the execute_asynchronous method of the proxy.
    Method parameters:
    P_DATA        Importing   Type     STRING
    P_TYPE        Importing   Type     STRING
    P_NAME        Importing   Type     STRING
    P_ATTACHMENT  Exporting   Type Ref IF_AI_ATTACHMENT
    P_AREF        Exporting   Type     STRING
    Method coding:
    METHOD create_attach_from_txt_withref.
      DATA: lo_attachment TYPE REF TO cl_ai_attachment,
            l_payload     TYPE REF TO if_xms_payload,
            l_pref        TYPE        sxms_mf_s,
            l_guid        TYPE        guid_32,
            l_aref        TYPE        string.
      CLASS cl_ai_factory DEFINITION LOAD.
    " create the attachment
      p_attachment = cl_ai_factory=>create_attachment_from_text(
                    p_data = p_data             " attachment data
                    p_type = p_type             " attachment type
                    p_name = p_name ).          " attachment name
    " we need an implementing class of the interface if_ai_attachment
      lo_attachment ?= p_attachment.
    " get the new payload
      l_payload = lo_attachment->get_payload( ).
    " get the reference of the payload
      l_pref = l_payload->getreference( ).
    " build an own reference
      CALL FUNCTION 'GUID_CREATE'
        IMPORTING
          ev_guid_32 = l_guid.
      CONCATENATE 'payload-' l_guid '@sap.com' INTO l_aref.
      CONCATENATE 'cid:'     l_aref            INTO l_pref-href.
    " set our own reference
      l_payload->setreference( reference = l_pref ).
    " write back the modified payload
      lo_attachment->set_payload( p_payload = l_payload ).
    " return of the reference
      p_aref = l_aref.
    ENDMETHOD.
    If anybody has an idea how to read the soap body within an adapter module please let me know.
    Regards
    Frank

  • VO.xml blank on server

    Hi,
    I am unable to see any in the VO.xml files. Due to this i am unable to work on any.
    what might be the issue.
    Error(5,2): <Line 5, Column 2>: XML-20108: (Fatal Error) Start of root element expected. for all VO.xml files
    thanks

    Kindly download the VO.xml file from server again. The files should be there and you would be able to see the xml files. In case there is a different server for Concurrent programs, kindly check for the files under appropriate server.
    Regards
    Sumit

Maybe you are looking for

  • Trying to use JDO objects as DTO over EJB???

    I have implemented the implemented the seralize interface in my JDO object classes. My JDO classes are only a data framework, I use them on both my EJB tier and I would like to use them on the web tier.... My thinking was to serialize the object grap

  • GS60 Ghost Pro Unboxing! With ga-young kim

    Hello, I am Kim, Ga Young aka Aphrodite, a progamer of team Startale. Today I will introduce a special laptop from MSI. Recently I was in need of a lighter and thinner laptop since I had to go out more often. So I purchased a laptop and went straight

  • How to get path

    Hello How do I get the current path an object is executing from? This is for a simple test. I have a file I want to open up within my object. That file is being copied to the .class directory where my object is. I just want to figure out how to use s

  • How To Open a subVi by pressing an "open file button",

    I got this Readdatasubvi I want to run when I press a 'Open file' button in the main vi, Then  The sub vi runs and a open file menu opens to choose a file to read from and plot out to a graph. It is working but how can I see the readDataSub VI as an

  • Download Skype to Z10 - Error message appears " Error Installing Applicatio​n "

    I deleted the Skype app by accident - went to BB World and downloaded the Skype app - it downloaded and commenced installing 75% through the message appeared Error Installing Application The Skype app appear but never initiallised - I deleted it - sh