WAS v8.5 > Troubleshoot > Troubleshooting web services > Troubleshooting web servicesTrace SOAP messages with tcpmon
Overview
We can trace SOAP messages that request web services using the tcpmon tool. Other trace tools are also available. IBM recommends to not use tcpmon tool in a stressed environment. Messages exchanged between a client and the server are captured 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.webservices.engine.utils.tcpmon
...to trace the SOAP messages. This class...
- redirects messages from a port
- records the messages
- forwards the messages to another port
WebSphere Application Server typically listens on port 9080, or port 80 if you are using IBM HTTP Server. The tcpmon process can be configured to listen on a particular port, such as 9088, while redirecting messages to another port, such as 9080 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 command-line tool on the client EAR file to regenerate the service implementation.
If the web services application contains only JAX-WS endpoints, we do not need to run wsdeploy, which is used to process only JAX-RPC endpoints.
Procedure
- Display a window labeled TCPMonitor...
cd C:\IBM\WebSphere\AppServer\java_1.7_64\bin
java -cp c:\IBM\WebSphere\AppServer\runtimes\com.ibm.ws.webservices.thinclient_8.5.0.jar com.ibm.ws.webservices.engine.utils.tcpmon- Configure the TCPMonitor to listen on port 9088 and forward messages to port 9080.
- In the Listen Port # field, enter 9088.
- Click Listener.
- In the TargetHostname field, enter localhost.
- In the Target Port # field, enter 9080.
- Click Add.
- 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.
Save the message data and analyze it.
Related
Tracing web services
Troubleshooting web services