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...
- 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% 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.
The messages exchanged between the client and server appear in the TCPMonitor Request and Response pane.
Save the message data and analyze it.
See AlsoTroubleshooting Web services based on Web Services for J2EE
Troubleshooting the run time of Web services based on Web Services for J2EE