How to extract Payload from Soap message


I have a requirement where they will post a data to a service where I need to extract the payload and do some other stuff.

The data looks like this,

<soap:Envelope xmlns:soap=“” xmlns:aaf=“”>
aaf:strXmlxmlpayload will be here</aaf:strXml>

The thing is that I dont need the soap wrapper…I only need the payload which is present. I need to extract the payload. How can I achieve this. Please let me know…I am very new to this soap envelopes.

Hi David,

There is a set of built-in services available that can act on the soapData. Go thru them under the folder SOAP in the built-in services reference document.

To answer your question, use this service: pub.soap.utils:getBody which will extract the body as a node from the soap data. Then you can convert it any format you wish.


Hi Suren,

Thanks for your reply.

I tried doing this. I am treating the incoming data as string. Then I am converting it to SoapData using stringtoSoapData service and passing the SoapData to getbody service in soap utils and then it is extracting the payload.

Thanks much for your response.