JWS, Axis2, CXF
1. Download Axis2.war and Axis2.bin.zip
2. Deploy the Axis2.war package to Tomcat and start the Tomcat test: HTTP://LOCALHOST:8089/AXIS2
3. Create a new Web project, create a new class in src to write good code as a service side, without the package name, compile build. Class,
Copy to Tomcat\webapps\axis2\web-inf\pojo (new Pojo required)
4. Run http://localhost:8089/axis2/services/listServices to view the service name
5. Access to services: Http://localhost:8089/axis2/services/DataGetService
6. Client calls write class code and run HTTP://LOCALHOST:8089/AXIS2/SERVICES/DATAGETSERVICE?WSDL
# # #集成到ssmm The Web project, copy the Axis2-web to WebApp, and copy lib, conf, modules, services to Web-inf,
Spring-axis2.xml:
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE beans Public "-//spring//dtd bean//en"
"Http://www.springframework.org/dtd/spring-beans.dtd" >
<beans>
<bean id= "ApplicationContext" class= "Org.apache.axis2.extensions.spring.receivers.ApplicationContextHolder"/ >
<bean id= "HelloWorld" class= "Com.net.xinfang.axis2.server.HelloWorld" ></bean>
</beans>
web.xml join
<SERVLET>
Span style= "font-size:16px" ><SERVLET-NAME>AXISSERVLET</SERVLET-NAME>
<SERVLET-CLASS>ORG.APACHE.AXIS2.TRANSPORT.HTTP.AXISSERVLET</SERVLET-CLASS>
<LOAD-ON-STARTUP>2</LOAD-ON-STARTUP>
</SERVLET>
<servlet-mapping>
Span style= "font-size:16px" > <servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
New Hello under Services, new Servicedata.xml and Services.xml in Hello
Servicedata.xml
<?xml version= "1.0" encoding= "UTF-8"?>
<ServiceData>
</ServiceData>
Services.xml
<serviceGroup>
<service name= "HelloWorld" >
<description>
Test Service Example
</description>
<parameter name= "Serviceobjectsupplier" ><!--fixed--
Org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier
</parameter>
<parameter name= "springbeanname" >HelloWorld</parameter><!--Bean name --
<parameter name= "ServiceClass" >
Com.net.xinfang.service.HelloWorld
</parameter>
<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>
</service>
</serviceGroup>
or
<service name= "HelloWorld" >
<description>
HelloWorld Service Example
</description>
<parameter name= "ServiceClass" >
Com.cm.service.HelloWorld
</parameter>
<operation name= "SayHello" >
<messagereceiver class= "Org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
</service>
Java Records-webservice Development deployment