Enabling the SOAP Monitor Utility

The SOAP Monitor utility provides a way for web service developers to view the SOAP messages that are being used to invoke the web services, along with the results of those messages. In this utility, a handler has been written and added to the global handler chain. As SOAP requests and responses are received, the SOAP message information is forwarded to a SOAP monitor service. This data can then be accessed with a web browser by navigating to http://localhost:8888/api/SOAPMonitor (where 8888 is the port number on which the web server is running).

The SOAP message information is displayed through a web browser by using an applet that opens a socket connection to the SOAP Monitor service. This applet requires Java plugin 1.3 or higher to be installed in your browser; if you do not have a correct plugin, the browser will prompt you to install one. You can configure the port used by the SOAP Monitor service to communicate with applets (default port is 5001) by editing the web.xml file to change the port used by the Axis2 web application.

Although the SOAP Monitor module is available, for security reasons it is not engaged by default and should be disabled after troubleshooting (i.e., reverse the steps below). Back up all files before modifying them.

To enable the SOAP Monitor utility:
  1. Navigate to the webserver/webapps/axis2/WEB-INF/services directory and extract the AlarmPointWebService.aar file:
  2. To engage the SOAP Monitor, insert the following line inside the <services> tag at the end of the services.xml file (located at <xMHOME>/webserver/webapps/axis2/WEB-INF/services/AlarmPointWebService/META-INF):
        <module ref="soapmonitor"/>
  1. Configure the Soap Monitor servlet to communicate with the applet and the default servlet so that it can serve up the Applet classes:
<servlet>
  <servlet-name>SOAPMonitorService</servlet-name>
  <display-name>SOAPMonitorService</display-name>
  <servlet-class>org.apache.axis2.soapmonitor.servlet.SOAPMonitorService</servlet-class>
  <init-param>
    <param-name>SOAPMonitorPort</param-name>
    <param-value>5001</param-value>
  </init-param>
  <load-on-startup>1</load-on-startup>
</servlet>
 
<servlet>
  <servlet-name>default</servlet-name>
  <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
  <init-param>
    <param-name>acceptRanges</param-name>
    <param-value>true</param-value>
  </init-param>
  <init-param>
    <param-name>dirAllowed</param-name>
    <param-value>false</param-value>
  </init-param>
  <init-param>
    <param-name>redirectWelcome</param-name>
    <param-value>true</param-value>
  </init-param>
  <init-param>
    <param-name>maxCacheSize</param-name>
    <param-value>2000000</param-value>
  </init-param>
  <init-param>
    <param-name>maxCachedFileSize</param-name>
    <param-value>254000</param-value>
  </init-param>
  <init-param>
    <param-name>maxCachedFiles</param-name>
    <param-value>1000</param-value>
  </init-param>
  <init-param>
    <param-name>useFileMappedBuffer</param-name>
    <param-value>true</param-value>
  </init-param>
  <load-on-startup>0</load-on-startup>
</servlet>
 
<servlet-mapping>
  <servlet-name>SOAPMonitorService</servlet-name>
  <url-pattern>/SOAPMonitor</url-pattern>
</servlet-mapping>
 
<servlet-mapping>
  <servlet-name>default</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>
 
  1. Get the compiled applet classes from the jar file. (See instructions below for more information.)
  2. Restart the server.
  3. Using a Web browser, navigate to http[s]://host[:port][/webapp]/SOAPMonitor (e.g.http://localhost:8888/api/SOAPMonitor), substituting the correct values for your web application.

Getting compiled applet classes from the jar file

Note that the following steps require the Java Development Kit (JDK) to execute.

To extract the file:
  1. Copy the jar file to an external directory.
  2. Execute the command jar -xf <jarFileName>
  3. Do one of the following:

Ping Service for Web Services

Web Services