Axis2 spring发布WebService
在axis2的
\WEB-INF\services
目录下,建立文件myWebService.aar,包含以下
\META-INF\services.xml
\lib
法1:以spring bean方式
<serviceGroup> <service name="myWebService" > <description>Spring aware</description> <parameter name="ServiceObjectSupplier"> org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier </parameter> <parameter name="SpringBeanName"> myWebService </parameter> <messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> </messageReceivers> </service> </serviceGroup>
法2:以类的命名空间的方式
<serviceGroup> <service name="myWebService" > <parameter name="ServiceClass"> com.my.webservice.testWebService </parameter> <messageReceivers> <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> </messageReceivers> </service> </serviceGroup>