ColdFusion MX: Monitoring HTTP and SOAP traffic
ColdFusion MX ships with the Apache Axis TCPMonitor (tcpmon) utility. This utility lets you monitor the request and response flow of HTTP and SOAP traffic.
To run TCPMonitor:
- Launch TCPMonitor by executing the sniffer utility (sniffer.exe) in the cf_root/runtime/bin directory. The TCPMonitor main windows appears.
The following table describes the available fields:
Field Description Listen Port# Enter a local port number, such as 8600, to monitor for incoming connections. Instead of requesting the usual port on which your target server runs, you request this port. TCPMonitor intercepts the request and forwards it to the port on which your server runs. Listener Select Listener to use TCPMonitor as a service to monitor the request and response flow of HTTP traffic. Proxy Select Proxy to enable proxy support for TCPMonitor. Target Hostname Enter the target host to which incoming connections are forwarded. Target Port# Enter the port number on the target host to which incoming connections are forwarded. HTTP Proxy Support Select this check box only to configure proxy support for TCPMonitor. - Enter a port number in the Listen Port # field, for example 8600.
- Select the Listener radio button from the Act as a... option.
- Enter the target host name, for example localhost.
- Enter the target port number, for example 8500.
- Click Add. This creates a new tab called Port8600.
- Select the Port8600 tab. If there are no port conflicts, a
Waiting for Connection...message will be displayed. If there is a port conflict, ajava.net.BindException: Address already in use: JVM_Binderror message will be displayed. To resolve this error, select another port number for the Listen Port # value, ensure that this port is not already in use and click the Start button. - Request a page using the Listen Port (8600) defined in this TCPMonitor session. For example, enter the following URL in your browser:
http://localhost:8600/CFIDE/administrator/index.cfm - TCPMonitor displays the current request and response information:
For each connection, the request appears in the Request panel and the response appears in the Response panel. TCPMonitor keeps a log of all request-response pairs and lets you view any particular pair by selecting an entry in the top panel. - To save results to a file for later viewing, click Save. To clear the top panel of older requests that you do not want to save, click Remove Selected and Remove All.
- To resend the request that you are currently viewing and view a new response, click Resend. You can edit the request in the Request panel before resending, and test the effects of different requests.
- To add another listener, click the Admin tab and enter the values as described previously.
View a demonstration of these steps.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
