Monitoring TCP-Based Messages¶
Users can view and monitor the messages passed along a TCP-based conversation using the TCPMon utility. Therefore, this is a convenient tool, particularly useful for debugging when you develop Web services. TCPMon is an Apache project distributed under Apache 2.0 License .
TCPMon is not dependent on any third party libraries. Its user interface is based on a swing UI and works on almost all platforms that support Java.
Starting TCPMon¶
TCPMon is available in the <PRODUCT_HOME>/bin
directory of any WSO2 Carbon based product distribution. Alternatively, you can download TCPMon from Apache and run the tool.
Running TCPMon (from Carbon product pack)¶
Ensure that the following prerequisites are fulfilled in order to run TCPMon.
- Install JDK 1.4 or later version.
- Set the
JAVA_HOME
variable. This setting is required only if you are using the TCPMon available in the WSO2 Carbon based product pack.!!! info
For information on how to set the
JAVA_HOME
variable, go to Installing the Product , select the instructions relevant to your operating system and refer the 'Setting JAVA_HOME' section.
To run the TCPMon available with your WSO2 Carbon product pack:
- Go to
<PRODUCT_HOME>/bin
directory of your product pack. -
Execute the following command to run the tool. For Windows
tcpmon.bat
For Linux
./tcpmon.sh
Running TCPMon (downloaded from Apache)¶
To download TCPMon from Apache and run the tool:
- Download TCPMon from the following location: http://archive.apache.org/dist/ws/tcpmon/1.0/tcpmon-1.0-bin.zip .
- Extract tcpmon-1.0-bin.zip archive.
- Go to the build of the extracted directory to find the execution script.
-
Execute the following command to run the tool.
For Windows
tcpmon.bat
For Linux
./tcpmon.sh
Other Usages of TCPMon¶
TCPMon is primarily used for message monitoring. Additionally, TCPMon can also be used for sending requests to web services and as a proxy service. Refer Starting TCPMon for details on how to start the tool.
Sending Requests for Web Services¶
TCPMon can also be used as a request sender for Web services. The request SOAP message can be pasted on the send screen and sent directly to the server.
As a Proxy¶
TCPMon can act as a proxy. To start it in proxy mode, select the Proxy option. When acting as a proxy, TCPMon only needs the listener port to be configured.
Advanced Settings¶
TCPMon can simulate a slow connection, in which case the delay and the bytes to be dropped can be configured. This is useful when testing Web services.
Also, if HTTP proxy support is required, that can also be set on the admin screen.
Top