SOAP得Axis2的使用(四)Use the monitor to trace the data

SOAP得Axis2的使用(四)Use the monitor to trace the data

Official Website
http://ws.apache.org/axis2/

The goal of the SOAP Monitor utility is to provide a way for the developers to monitor these SOAP messages without requiring any special configuration or restarting the server.

The SOAP Monitor module (soapmonitor.mar) is available in the axis2.war but it is not engaged by default. The SOAP Monitor is NOT enabled by default for security reasons.

1. engage the monitor by inserting the following in the axis2.xml file:
<module ref="soapmonitor" />

2. add the servlet to web.xml:
<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-mapping>
<servlet-name>SOAPMonitorService</servlet-name>
      <url-pattern>/SOAPMonitor</url-pattern>
</servlet-mapping>

3. add the soapmonitor jar to the server
<dependency org="org/apache/axis2" name="soapmonitor" rev="1.5.1" />

start the server and visit URL http://localhost:8080/easyaxis/SOAPMonitor

the error messages:
Java Plug-in 1.6.0_20
使用 JRE 版本 1.6.0_20-b02 Java HotSpot(TM) Client VM
用户主目录 = C:\Users\dell
----------------------------------------------------
c:   清除控制台窗口
f:   终结在结束队列上的对象
g:   垃圾收集
h:   显示此帮助消息
l:   转储类载入程序列表
m:   打印内存使用
o:   触发日志记录
q:   隐藏控制台
r:   重新载入策略配置
s:   转储系统和部署属性
t:   转储线程列表
v:   转储线程堆栈
x:   清除类载入程序高速缓存
0-5: 设置跟踪级别为<n>
----------------------------------------------------


载入:找不到类 org.apache.axis2.soapmonitor.applet.SOAPMonitorApplet.class。
java.lang.ClassNotFoundException: org.apache.axis2.soapmonitor.applet.SOAPMonitorApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://localhost:8080/easyaxis/org/apache/axis2/soapmonitor/applet/SOAPMonitorApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
异常:java.lang.ClassNotFoundException: org.apache.axis2.soapmonitor.applet.SOAPMonitorApplet.class

4. unzip the jar file and copy the directory org to easyaxis WebRoot
visit http://localhost:8080/easyaxis/SOAPMonitor again. That is good now.

Problem, I met mess code after I capture the data. All the SOAP xml seems to be mess codes.
Solution: I change a computer and browser, that will be ok. Maybe the problem is from the version of jre and my win7 system.

References:
http://axis.apache.org/axis2/java/core/docs/soapmonitor-module.html



你可能感兴趣的:(java,apache,Security,SOAP,sun)