Logging Soap Messages

Hi Guys,

How do I log an outgoing SOAP message to console or anywhere? I’m testing a web service connector to a remote server, and I’m having timeout issues.

So I just wanted to validate the outgoing message format before I get the guys working on the remote server involved.

I used the new web service descriptor wizard using a wsdl to auto-generate my connector services/doc types, etc.

Thanks

A tool like Apache TCPMon could be used to capture the outbound message or you could convert the soap message to a string and write it to the console or to a file.

If you use SoapUI to independently test the service that IS is consuming, then you could compare the message it generates with the one IS is sending.

Mark

“or you could convert the soap message to a string and write it to the console or to a file.”

This is exactly what I want to do. I just have absolutely no idea how to implement it. Extremely new here, this is in fact my first try at invoking remote webservices.

I have a MAP step followed by the pub.client.soapClient step in a sequence. So maybe a documenttoXMLString or SOAPDataToconversion then a pub.flow.debugLog?

Or more specifically I’d like to be about to print the whole SOAP envelope from the service.

The pub.soap.utils:soapDataToString built-in service will convert a soapData object to an XML string.

which attribute in pub.client.soapClient/pipeline is a valid soapData object to use with soapDataToString??

In your generated webservice just before the soapHttp call, there will be a soapData object. It is created by a few steps like createSoapData, addHeaderEntry and addBodyEntry to build the complete message. Add a step to convert to string using soapDataToString. You can log it somewhere, or email it for testing purposes.

Thanks for the response, however the generated webservice doesn’t use the soapHttp call, it used the soapClient process, and doesn’t appear to contain a soapData object

hi qgittingsatc,
did you ever figure out how to resolve this problem? I’m having a similar issue
Thanks

You can temporarily crank up the logging for the specific areas you’re looking for in the IS. I turned up ‘SOAP’, Http request, response, header to ‘Debug’ from ‘Info’. Then you see the request, response, etc in the server logs.

I also got TCPMON going but it doesn’t work if the request is via https since it’s encrypted.

If you set the following parameters, it will log to stdout:

watt.server.SoapRPC.debug=true
watt.server.SoapRPC.verbose=true

Despite having SoapRPC, it will still work for soapClient on 7.1.

THANK YOU!

That worked perfectly!

Sorry for the newbie question, but where did you crank up the logging for ‘SOAP’, Http request, response, header?

Can this be done in the call to the routine, or does this need to be done on the server?

Our server is controlled by our ops team, so I’m looking for a way to log the message from within the flow that I’m writing, not by tweaking global server params.

Sure thing, in IS, go to Settings:Extended and add the following key/value pairs.

watt.server.SoapRPC.debug=true
watt.server.SoapRPC.verbose=true

Hi,
I set these in extended settings

watt.server.SoapRPC.debug=true
watt.server.SoapRPC.verbose=true
watt.server.SoapRPC.checkHeaders=true

Also changed the Logging level for ( HTTP header, request, response, SOAP) to Debug from Info but still could not see the https soap message that is going out to call a webservice.

I am sing WM 7.1 and pub.client:soapClient service

Please help,
Thank you.

For 7.1.1 this is what I did to get the soap messages from WM for adhoc needs.

You need logging -> SOAP -> debug/trace set in IS admin

ALSO extended settings of

watt.server.SoapRPC.debug=true (dumps the outbound message and incoming soap:Body to the console, nohup file)
watt.server.SoapRPC.verbose=true (dumps the pipeline used to create the out bound message to the console, nohup file)

AND ONLY THEN THE SOAP REQ/RESPONSE GOES TO NOHUP* file unders logs in IS. Note it did not go to server.log file.

For continual needs in real code you will need to modify the generated connector to return the doc request and soap response string and convert the doc request to soap using pub.soap… and store in some log table using pub-sub.

You can display all SOAP request/response data in IntegrationServer stdout.

Browse to IS-> Settings -> Extended -> Show and hide keys , and click on

watt.server.SoapRPC.debug
watt.server.SoapRPC.trace
watt.server.SoapRPC.verbose

Save changes and now go to Settings -> Extended -> Edit extended settings

Change values for those 3 from false to true.

Restart IS and check stdout.

You would get all SOAP exchange information… if you only want the requests/response I believe the .trace option was ok.

Good luck.