Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Websphere: log soap requests & responses

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?

like image 684
Igor Avatar asked Feb 29 '12 09:02

Igor


People also ask

What is the use of SOAP connector port in WebSphere?

The SOAP connector port is more firewall compatible. The default setting of the SOAP port is 8880. The InterProcess Connector (IPC) port is a more stable and robust connection between the workbench and the local server. The default setting of the IPC port is 9633.

What is SOAP in WebSphere application server?

SOAP 1.1 is a protocol-independent transport and can be used in combination with a variety of protocols. In web services that are developed and implemented with WebSphere Application Server, SOAP is used in combination with HTTP, HTTP extension framework, and Java™ Message Service (JMS).

How do you trace a SOAP call?

You can trace SOAP messages exchanged between a client and the server by installing a monitor or sniffer application to capture the HTTP traffic between the two points. The application server product provides a utility class, com. ibm. ws.


2 Answers

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.

like image 166
Igor Avatar answered Nov 03 '22 00:11

Igor


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.

like image 32
Davy Vanherbergen Avatar answered Nov 02 '22 23:11

Davy Vanherbergen