Tracing SOAP messages with tcpmon

You can trace SOAP messages that request web services by using the tcpmon tool.

Before you begin

You can use other trace tools to trace SOAP messages, similar to how you can trace web services components. See the tracing web services information to learn more about these other trace tools.

It is not recommended that you use the tcpmon tool in a stressed environment. Tcpmon is only for monitoring SOAP messages in a lightweight environment.

About this task

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 application server 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 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 Web Services Description Language (WSDL) file to use port 9088 and then running the wsdeploy command-line tool on the client enterprise archive (EAR) file to regenerate the service implementation.

La commande wsdeploy est prise en charge par des applications Java™ API for XML-based RPC (JAX-RPC). Le modèle de programmation Java API for XML-Based Web Services (JAX-WS) qui est implémenté par le serveur d'applications ne prend pas en charge la commande wsdeploy. Si votre application de services Web contient uniquement des noeuds finaux JAX-WS, il n'est pas utile d'exécuter la commande wsdeploy, car elle n'est utilisée que pour traiter les noeuds finaux JAX-RPC.

Procedure

  1. Run the following command to display a window labeled TCPMonitor:
    java -cp app_server_root/runtimes/com.ibm.ws.webservices.thinclient_8.5.0.jar com.ibm.ws.webservices.engine.utils.tcpmon
  2. 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 the Port 9088 tab that is displayed.

Results

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

What to do next

Save the message data and analyze it.

Icône indiquant le type de rubrique Rubrique de tâche



Icône d'horodatage Dernière mise à jour: July 9, 2016 2:35
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twbs_tracewbs
Nom du fichier : twbs_tracewbs.html