把axis2的webservice打包aar

1.生成aar文件
   jar cvf xxxx.aar -C D:\WorkSpace\myaxis2\bin .

说明:最后的点不能少

2.准备services.xml文件
<!--service标签的name属性值自定义,parameter标签的值为提供webservice服务的类的全名 -->
<service name="tran" >
	<description>
		Please Type your service description here
	</description>
	<messageReceivers>
		<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
		<messageReceiver  mep="http://www.w3.org/2004/08/wsdl/in-out"  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
	</messageReceivers>
	<parameter name="ServiceClass">com.pepple.core.Transfer</parameter>
</service>



3.把services.xml压缩到xxxx.aar文件中的META-INF目录下.

你可能感兴趣的:(webservice,axis2,aar)