Websphere: log soap requests & responses

Igor picture Igor · Feb 29, 2012 · Viewed 18.2k times · Source

I'm using Websphere 7. Using existing WSDL, I've created WS client using wsimport ant task (com.sun.tools.ws.ant.WsImport).

Is there a way I can log SOAP xml requests/responses sent/received by this client?

Answer

Igor picture Igor · Mar 5, 2012

Trace for SOAP WS messages can be enabled by following these steps on Websphere 7 administration console:

  • Go to administration console
  • Go to: Servers -> WebSphere application servers -> server > Change Log Detail Levels
  • In the package tree find the package com.ibm.ws.websvcs.trace, click on package name and choose 'All Mesasges and Traces', as result you should have log details set as below:

*=info: com.ibm.ws.websvcs.trace.*=all

  • Click on 'OK' and then Save the changes.

SOAP request/responses can now be found in trace.log on your appl. server.