webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Logging Soap Messages

webMethods Community Member

webMethods Community MemberTue April 15, 2008 06:16 PM

  • 1.  Logging Soap Messages

    Posted Fri March 28, 2008 07:03 PM

    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


    #webMethods
    #soa
    #API-Management


  • 2.  RE: Logging Soap Messages

    Posted Fri March 28, 2008 07:05 PM

    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


    #webMethods
    #soa
    #API-Management


  • 3.  RE: Logging Soap Messages

    Posted Fri March 28, 2008 07:20 PM

    “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?


    #soa
    #API-Management
    #webMethods


  • 4.  RE: Logging Soap Messages

    Posted Fri March 28, 2008 07:55 PM

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


    #API-Management
    #soa
    #webMethods


  • 5.  RE: Logging Soap Messages

    Posted Fri March 28, 2008 09:59 PM

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


    #soa
    #API-Management
    #webMethods


  • 6.  RE: Logging Soap Messages

    Posted Fri March 28, 2008 10:38 PM

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


    #API-Management
    #soa
    #webMethods


  • 7.  RE: Logging Soap Messages

    Posted Mon March 31, 2008 06:04 PM

    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.


    #soa
    #webMethods
    #API-Management


  • 8.  RE: Logging Soap Messages

    Posted Mon March 31, 2008 07:18 PM

    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


    #API-Management
    #soa
    #webMethods


  • 9.  RE: Logging Soap Messages

    Posted Thu April 10, 2008 01:48 PM

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


    #API-Management
    #soa
    #webMethods


  • 10.  RE: Logging Soap Messages

    Posted Fri April 11, 2008 06:05 AM

    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.


    #API-Management
    #soa
    #webMethods


  • 11.  RE: Logging Soap Messages

    Posted Tue April 15, 2008 01:48 AM

    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.


    #soa
    #webMethods
    #API-Management


  • 12.  RE: Logging Soap Messages

    Posted Tue April 15, 2008 06:16 PM

    THANK YOU!

    That worked perfectly!


    #webMethods
    #soa
    #API-Management


  • 13.  RE: Logging Soap Messages

    Posted Thu August 07, 2008 08:33 PM

    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.


    #webMethods
    #soa
    #API-Management


  • 14.  RE: Logging Soap Messages

    Posted Thu August 07, 2008 09:00 PM

    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


    #API-Management
    #soa
    #webMethods


  • 15.  RE: Logging Soap Messages

    Posted Wed September 03, 2008 01:05 AM

    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.


    #API-Management
    #soa
    #webMethods


  • 16.  RE: Logging Soap Messages

    Posted Wed February 03, 2010 10:12 PM

    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.


    #soa
    #API-Management
    #webMethods


  • 17.  RE: Logging Soap Messages

    Posted Wed February 03, 2010 10:47 PM

    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.


    #webMethods
    #API-Management
    #soa