Tracing SOAP messages
Overview
This topic discusses tracing SOAP messages that request Web services that are developed and implemented based on the Web Services for Java 2 platform, Enterprise Edition (J2EE) specification.
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 WebSphere product provides a utility class, com.ibm.ws.webservices.engine.utils.tcpmon, to trace the SOAP messages. The com.ibm.ws.webservices.engine.utils.tcpmon class redirects messages from a port, records the messages, and forwards them to another port.
WebSphere Application Server typically listens on port 9080, or port 80 if you are using IBM HTTP Server. To trace messages sent to the appserver, this task documents how to configure the tcpmon process, which is configured to listen on port 9088, and redirects messages to port 9080 or port 80. The client is redirected to use port 9088 to access the Web service.
Redirecting an application client to a different port is most easily done by changing the SOAP address in the client's Web Services Description Language (WSDL) file to use port 9088 and then running the wsdeploy command-line tool on the client EAR file to regenerate the service implementation.
You should confirm that the server providing the Web service is running. The following task is performed on the machine providing the Web service.
Overview
To trace SOAP messages in Web services:
- Set up a development and unmanaged client execution environment for Web services based on Web Services for J2EE
- Run the java -Djava.ext.dirs=%WAS_EXT_DIRS% com.ibm.ws.webservices.engine.utils.tcpmon command. A window labeled TCPMonitor displays.
- 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 on the Port 9088 tab that displays on the top of the page.
Results
The messages exchanged between the client and server appear in the TCPMonitor Request and Response pane.
What to do next
Save the message data and analyze it.
Troubleshooting Web services based on Web Services for J2EE
Troubleshooting the run time of Web services based on Web Services for J2EE