版本CXF2.6.9
添加的包文件
这个版本的不可在Tomcat7上运行,会出错。
配置文件
applicationContext.xml
[html] view plain copy
- <?xml version\="1.0" encoding\="UTF-8"?>
-
<beans xmlns=“http://www.springframework.org/schema/beans”
-
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
-
xmlns:jaxws=“http://cxf.apache.org/jaxws”
-
xsi:schemaLocation="http://www.springframework.org/schema/beans
-
http://www.springframework.org/schema/beans/spring-beans.xsd
-
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
-
<import resource=“classpath:META-INF/cxf/cxf.xml” />
-
<import resource=“classpath:META-INF/cxf/cxf-servlet.xml” />
-
jaxws:endpoint id\=“helloWorld” implementor\=“demo.spring.service.HelloWorldImpl” address\="/HelloWorld" /
-
-
-
</beans>
web.xml
[html] view plain copy
- <?xml version\="1.0" encoding\="UTF-8"?>
-
<web-app version=“3.0”
-
xmlns=“http://java.sun.com/xml/ns/javaee”
-
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
-
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
-
<display-name></display-name>
-
<context-param>
-
<param-name>contextConfigLocation</param-name>
-
<param-value>WEB-INF/applicationContext.xml</param-value>
-
</context-param>
-
<listener>
-
<listener-class>
-
org.springframework.web.context.ContextLoaderListener
-
</listener-class>
-
</listener>
-
<servlet>
-
<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&