<!-- CXF Web Services 配置信息 -->
<servlet>
<display-name>CXF Servlet</display-name>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/services/*</url-pattern><!--注意这里的配置/services/ 这里是生成wsdl路径的一部分,wsdl的路径::8080/项目路径/services/spring cxf配置文件中的address?wsdl-->
</servlet-mapping>
配置文件2:(spring cxf 配置文件)
<?xml version="1.0" encoding="UTF-8"?>
<!-- START SNIPPET: beans -->
<beans xmlns=""
xmlns:xsi=""
xmlns:jaxws=""
xsi:schemaLocation="
">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint
implementor="com.cslc.crius.common.ws.cxf.server.HelloWorldImpl"
address="/HelloWorld" />
<jaxws:endpoint
implementor="#workUnitInfoImpl"
address="/WorkUnitInfo"
/>
<bean>
<!--如果webservice中有需要加载其他类,采用注解的方式不行,需要在配置文件中显示声明-->
<property ref="workUnitServiceImpl"></property>
</bean>
</beans>
<!-- END SNIPPET: beans -->