Because AXIS2 supports both soap and restful webservice development.
My goal is mostly restful, here's a simple example of a soap:
Original address: https://jingyan.baidu.com/article/4d58d5411cebdc9dd4e9c099.html
"Step" (because it is a small note, so it is very simple to write, do not understand the waste of time oh, there are many good examples online)
1. Create a dynamic WEB Project project with Eclipse
2, write the service-side method (is to create a simple package and Class), this class is used to publish some of the services, the class inside the method is the external interface method name.
My bag: com.sf.axis2.test
My class:wservicedemo1.
My method:wservicemethod1.
3, right-click on the project name-new--other--Select Web Service (note that Eclipse version requires Aixs service, can be viewed through windows--properties--web service)
4. In service implementation, select the class you just created Com.sf.axis2.test.WServiceDemo1 as an interface for external publishing (do not select public and monitor, direct finish)
5, after completion will automatically create a file WSDL file, open the WSDL file, you can see the WSDL external address (location tag position). After you start the project on Tomcat, open the address in the browser (followed by the WSDL to open the description to create the success)
Eclipse + Apache Axis2 release SOAP WebService (iii) First program Hello Axis2 soap!