+

Search Tips   |   Advanced Search

Tracing SOAP messages with tcpmon



Overview

We can trace SOAP messages that request Web services by using the tcpmon tool.

We 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 appserver product provides a utility class...

...to trace the SOAP messages. This class...

  1. Redirects messages from a port
  2. Records the messages
  3. Forwards the messages to another port

WAS typically listens on port 9082, or port 80 if we are using IHS. The tcpmon process can be configured to listen on a particular port, such as 9088, while redirecting messages to another port, such as 9082 or port 80. The client is redirected to use port 9088 to access Web services.

Redirecting an application client to a different port is done by changing the SOAP address in the client WSDL file to use port 9088 and then running the wsdeploy tool on the client EAR file to regenerate the service implementation.

The wsdeploy command is supported by JAX-RPC applications. The JAX-WS model that is implemented by the application server does not support the wsdeploy command. If your Web services application contains only JAX-WS endpoints, you do not need to run the wsdeploy command, as this command is used to process only JAX-RPC endpoints.

 

Trace SOAP messages using tcpmon

  1. Run the following command to display a window labeled TCPMonitor:

      java -cp APP_ROOT/runtimes/com.ibm.ws.webservices.thinclient_7.0.0.jar com.ibm.ws.webservices.engine.utils.tcpmon

  2. Set the TCPMonitor to listen on port 9088 and forward messages to port 9082.

    1. In the Listen Port # field, enter 9088.
    2. Click Listener.
    3. In the TargetHostname field, enter localhost.
    4. In the Target Port # field, enter 9082.
    5. Click Add.
    6. Click the Port 9088 tab that displays on the top of the page.

 

Results

The messages exchanged between the client and server display in the TCPMonitor Request and Response pane.

 

Next steps

Save the message data and analyze it.

 

Related tasks

Tracing Web services
Troubleshooting Web services