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

本文介绍如何在Apache Axis2中启用SOAP Monitor模块来监控SOAP消息,包括配置步骤及解决常见问题的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值