A Axis2 module (soapmonitor) is provided in Axis2, which implements the same function as the Axis2 module implemented in AXIS2 (9): Writing logging module (module) in the WebService Auditorium, The logging module outputs SOAP request and response messages directly to the Tomcat console, while the Soapmonitor module uses applets to output SOAP request and response messages directly from the page.
The following are steps for configuring and using the Soapmonitor module:
Step 1th: Deploy applets and servlet
Because Axis2 has the Soapmonitor module by default, the Soapmonitor module does not need to be installed separately. However, the corresponding. class files involved in the applet need to be installed. Locate the Soapmonitor-1.4.1.jar file in the <tomcat installation directory >\webapps\axis2\web-inf\lib directory and unzip the file. Although the applet does not require all the. class files in the Soapmonitor-1.4.1.jar file, the reader can also copy the Org directory in the extracted directory directly to the <TOMCAT installation directory for convenience >\webapps\ In the Axis2 directory, the. class file required by the applet needs to be placed in this directory. The org directory is then copied to the <tomcat installation directory >\webapps\axis2\web-inf\classes directory, and the corresponding. class file for the servlet in the Soapmonitor module needs to be placed in this directory.
Step 2nd: Configure the Servlet
Open the <tomcat installation directory >\webapps\axis2\web-inf\web.xml file and add the following:
<servlet>
<servlet-name>SOAPMonitorService</servlet-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-mapping>
<servlet-name>SOAPMonitorService</servlet-name>
<url-pattern>/SOAPMonitor</url-pattern>
</servlet-mapping>
Step 3rd: Referencing the Soapmonitor module in the Services.xml file
As with referencing the logging module, the Reference Soapmonitor module also requires the use of the <module> element, and the Services.xml file referencing the Soapmonitor module reads as follows:
<service name= "MyService" >
<description>
using logging and Soapmonitor modules
</description>
<!-- Reference logging module -->
<module ref= "Logging"/>
<!-- reference Soapmonitor module -->
<module ref= "Soapmonitor"/> <parameter "name="
>
service. MyService
</parameter>
<messageReceivers>
<messagereceiver mep= "http://www.w3.org /2004/08/wsdl/in-out "
class=" Org.apache.axis2.rpc.receivers.RPCMessageReceiver "/>
</ Messagereceivers>
</service>