2006年4月23日 星期日

Axis下使用SOAPMonitorService

參考網址
http://ws.apache.org/axis/java/user-guide.html#AppendixUsingTheSOAPMonitor

環境:
AXIS 1.3
Eclispe 3.1.1

axis web已經建立在tomcat上如: axisdemo
在 Axis 中使用SOAP Monitor:

1.在axisdemo目錄下 先編譯 SOAPMonitorApplet.java (classpath 加入 axis.jar)
如果沒有axisdemo 請先下載 axis package,
從%axis_home%\webapp\ 複製axis 到 %catalina_home%\webapp\
隨便rename axis 為名稱axisdemo

2.在 C:\Java\workspace\axisdemo\WEB-INF> java -Djava.ext.dirs=%AXIS_HOME%\lib org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axisdemo/services/AdminService
deploy-monitor.wsdd

3.
deploy-monitor.wsdd
--------------------------------------------------------------
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<handler name="soapmonitor"
type="java:org.apache.axis.handlers.SOAPMonitorHandler">
<parameter name="wsdlURL"
value="/axis/SOAPMonitorService-impl.wsdl"/>
<parameter name="namespace"
value="http://tempuri.org/wsdl/2001/12/SOAPMonitorService-impl.wsdl"/>
<parameter name="serviceName" value="SOAPMonitorService"/>
<parameter name="portName" value="Demo"/>
</handler>
<service name="SOAPMonitorService" provider="java:RPC">
<parameter name="allowedMethods" value="publishMessage"/>
<parameter name="className"
value="org.apache.axis.monitor.SOAPMonitorService"/>
<parameter name="scope" value="Application"/>
</service>
</deployment>
---------------------------------------------------------------

4.在需Monitor的services deploy裡加入
--------------------------------------------
<service name="xxx" provider="java:RPC">
<requestFlow>
<handler type="soapmonitor"/>
</requestFlow>
<responseFlow>
<handler type="soapmonitor"/>
</responseFlow>
</service>
-------------------------------------------
5.檢示 http://localhost:8080/axis/SOAPMonitor

參考網址:http://ws.apache.org/axis/java/user-guide.html#AppendixUsingTheSOAPMonitor

沒有留言: