Monitor connections (TCPMon)

The Apache Axis TCPMon utility provides a tool for monitoring messages passed over TCP/IP connections to various data sources, such as Remedy and Domino. TCPMon includes a graphical users interface, works on most platforms that Java supports, and does no depend on third party libraries. Some of the UI features rely on JDK 1.4, so TCPMon requires JRE that is 1.4 or higher.

You can download the utility from the Apache Web site. Select the latest version of Axis.

StepsStarting TCPMon

  1. Make sure Java is JDK 1.4 or higher, and %JAVA_HOME%\bin is in the PATH variable.

  2. The TCPMon utility can be found in the org.apache.axis.utils package which is zipped in axis.jar. To run it from the command line:

    cd [axis installation dir]
    java -cp .\lib\axis.jar
    org.apache.axis.utils.tcpmon 
    [listenPort targetHost targetPort]
    

    NoteIf you do not supply the optional arguments, the basic TCPMonitor GUI displays. You can supply the arguments from the GUI.

    Figure 9-1: Axis TCPMon admin tab

StepsUsing TCPMon

  1. Identify the connection to monitor; select:

    For example, if your Remedy Mid Tier is mymidtier.domain.com, and is running on port 80, then you enter those values in the target host and port.

  2. Click Add. Another tab appears in the window for the new tunneled connection.

    Figure 9-2: Axis TCPMon port tab

  3. Monitor the connection. Each time a SOAP connection is made to the local port, you will see the request appear in the “Request” panel, and the response from the server in the “Response” panel. TCPMon keeps a log of all request/response pairs, and allows you to view any particular pair by selecting an entry in the top panel. You may also remove selected entries, or all of them, or choose to save to a file for later viewing.

    The “resend” button will resend the request you are currently viewing, and record a new response. This is particularly handy in that you can edit the XML in the request window before resending – so you can use this as a great tool for testing the effects of different XML on SOAP servers. Note that you may need to change the content-length HTTP header value before resending an edited request.

StepsSending UA requests to TCPMon

  1. Locate the WSDL file, and save it locally. To do so, use Internet Explorer to get the WSDL content, right-click on the screen, and select “view source.”

  2. Find the address location:

    <soap:address
    location="http://mymidtier.domain.com/
    arsys/services/ARService?server=ua8&webService=
    HelpDesk_Query_Service" />
    

    Change it to include “localhost”:

    <soap:address 
    location="http://localhost:[tcpmon listen port]/
    arsys/services/ARService?server=ua8&webService=
    HelpDesk_Query_Service" />
    
  3. Save this file to SYBASE\tomcat\webapps\onepage; for example, testwsdl.xml.

  4. In Mobile Web Studio, in the Web Services tab, enter the URL to testwsdl.xml instead of the URL to the real Remedy Mid-Tier server.