1、写java类
package service;
public class MyService {
public String getGreeting(String name){
return "hello "+name;
}
public void update(String data){
System.out.print(data);
}
}
2、META_INFO写services.xml
<?xml version="1.0" encoding="UTF-8"?>
<service name="myService">
<description>sample</description>
<parameter name="ServiceClass">
service.MyService
</parameter>
<operation name="getGreeting">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>
<operation name="update">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
</operation>
</service>
3、编译 java cvf my.arr .
4、部署 tomca\webapp\axis2\WEB-INF\services
5、访问 http://localhost:8080/axis2/services/myService?wsdl