Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

For WebSphere Liberty Profile, logging of JAX-WS SOAP request and response messages can be enabled by adding the following trace configuration to the server.xml:

<logging traceFormat="BASIC" consoleLogLevel="INFO" traceSpecification="com.ibm.ws.jaxws.wsat.*=debug" traceFileName="stdout" />

Adding the traceFileName="stdout" attribute redirects the trace output to the console. Without this attribute it will write to the trace log file instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top