To capture HTTP trafic, create or edit an existing System Proxy. The value of the Capture field must be set to True. The other configuration details depends on the approach used to interject the System Proxy between the client and the server.
Scenario 1: Host Remapping
This scenario works when the web service' server is configured to use a host name, and a fixed IP address.
With host remaping, the original host name is mapped to the proxy IP address of the System Proxy (in the hosts file). The ProxyRemoteAddress field is mapped to the original fixed IP address of the server. The ProxyPort and ProxyRemotePort would match the value used by the server.
Scenario 2: Application Configuration Change
If the client can be reconfigured to use a different URL, then the URL of the web service can be re-written to point to the IP/port the System Proxy listens to (ProxyIPAddress/ProxyPort). The ProxyRemoteAddress and ProxyRemotePort will be pointed at the original web service host name/IP address and port.
||The Host HTTP header will have the value of the System Proxy. It is therefore possible to run into a configuration where the web service call will not succeed.
Scenario 3: Network Proxy
A System Proxy can be configured to act as an HTTP proxy by setting the System Proxy's property HttpProxyServer to True. By changing the configuration of the application, or the environment, to use the proxy, calls will be "routed" through the System Proxy.
Java supports a wide variety of solutions. For example, the simplest might be to use system properties. Below is a fragment of a command line, assuming the System Proxy has the ProxyIPAddress set to 127.0.0.1 and the ProxyPort to 8080:
java -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8080
Proxy settings for Java can also be configured using the Java Control Panel.
Most Windows applications rely on the global proxy settings which can be configured from the Control Panel, Network and Internet, Internet Options, Connections, Lan Settings.
The App.Config of .NET applications supports the definition of a defaultProxy which can be temporarily configured to facilitate the capture.
For all scenarios, after starting the System Proxy, requests from the client are forwarded to the server exactly as received; responses from the server are forwarded to the client exactly as received.
Once the session capture is completed, right click on the System Proxy and invoke the Save Proxy Recorded Session... command. The capture will then be saved in a Session File and attached to the System Proxy.