Extract Headers from SOAP Message in the Service

Team,

Can anyone help me out on how to extract the SOAP Header from a SOAP Message? Also is it possible to see the entire SOAP request coming from the client.

I tried using pub.soap.utils:getHeader in my flow service, but unable to get any results. Any help in this regards would be extremely helpful.

Regards,
Johnrose

Set the following extended settings to true for logging SOAP request-responses.

watt.server.SoapRPC.debug=false
watt.server.SoapRPC.trace=false
watt.server.SoapRPC.verbose=false

I am not sure what are you doing in your code but for getting the header entries these steps need to be done,

  1. Post a SOAP message over HTTP using the pub.client:http and convert the return stream inside the body document to soapData object using the built-in service pub.soap.utils:streamToSoapData.
  2. Use the soapData object from the above step to invoke pub.soap.utils:getHeaderEntries and that should get all the header entries as an array of objects.

Hello Akki84,

Thanks for your response. I will try to implement the steps that you have mentioned. But my Goal is to capture headerEntries in real time,

Say For Ex: An Consumer A wants to access the webService hosted on webMethods IS, I need to extract the information he is passing in his SOAP Request HEADER and BODY, before sending the SOAP Response back to him.

Regards,
Johnrose