There are several ways to implement WebService: axis, xFire, and CXF. This article mainly outlines how to build WebService with CXF. Using spring and CXF to integrate will make the construction of WebService easier.
Server:
- Create a new project ws, put cxf-2.2.9.jar and spring-related jar packages into the project
- Add the following configuration to the web.xml file to load the CXF Servlet:
<servlet> <servlet-name>CXFService</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>CXFService</servlet-name> < |