Layer7 API Management

  • 1.  Retrieve SOAP Body from the request

    Posted Jun 13, 2018 12:48 AM

    Hi Everyone,

     

    I am trying to retrieve only the Soap Body from the SOAP request in the SOAP Webservice published on API Gateway but I am not able to get only the Soap Body. I have tried multiple options like : ${request.mainpart.Body}  or ${request.mainpart.soap:Body}.

     

    Can anyone please suggest how to retrieve it ?



  • 2.  Re: Retrieve SOAP Body from the request
    Best Answer

    Posted Jun 13, 2018 02:23 AM

    what happens if you try just request.mainpart



  • 3.  Re: Retrieve SOAP Body from the request

    Posted Jun 14, 2018 10:58 AM

    As mentioned above, just ${request.mainpart} should give you the body.

    This and other related variables can be found here: Message Layer Context Variables - CA API Gateway - 9.3 - CA Technologies Documentation 



  • 4.  Re: Retrieve SOAP Body from the request

    Posted Jun 18, 2018 03:54 AM

    As MichielHelder and didsi01 mention, the ${request.mainpart} gives you the body of the message which is the Soap Envelope. I believe you are interested in the Soap Body, which you can select with the 

    Evaluate Request XPath Assertion



  • 5.  Re: Retrieve SOAP Body from the request

    Posted Jun 18, 2018 05:14 PM

    Thanks Remco. That was helpful but now I need to save the original Soap Action and use the same soap Action while sending the request to Salesforce. how can I save the original Soap Action that was sent and use it further in the code ? Thanks in advance, 



  • 6.  Re: Retrieve SOAP Body from the request

    Posted Jun 19, 2018 04:30 AM

    Depends. Is it in the http header or is it part of a WS-Addressing soap header?

     

    You can use the Require WS-Addressing Assertion to get the soap action from the soap header. For adding a WS-Addressing header in the xml use the Add WS-Addressing Assertion (several way for specifying the Action!)