Tracing SOAP messages

This topic discusses tracing SOAP messages that request Web services that are developed and implemented based on the Web Services for J2EE specification.You can trace the SOAP messages exchanged between a client and the server using the TCPMon command tool. The TCPMon command redirects messages from one port to another and records them. The WAS listens on port 9080. To trace messages sent to the appserver, the TCPMon command is configured to listen on port 9088 and redirect them to 9080. 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. To trace SOAP messages in Web services...

  1. Set up a development and unmanaged client execution environment for Web services based on Web Services for J2EE

  2. Run the java -Djava.ext.dirs=%WAS_EXT_DIRS% command. A window labeled TCPMonitor displays.

  3. Configure the TCPMonitor to listen on port 9088 and forward messages to port 9080.

    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 9080.

    5. Click Add.

    6. Click on the Port 9088 tab that displays on the top of the page.

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

Save the message data and analyze it.

 

See Also

Troubleshooting Web services based on Web Services for J2EE
Troubleshooting the run time of Web services based on Web Services for J2EE