1. 引入cxf的jar包
pom文件里面直接增加依赖
< dependency>
2. 配置web.xml文件
xml version= "1.0" encoding= "UTF-8" ?>
< web-app xmlns= "/xml/ns/javaee"
xmlns:xsi= "/2001/XMLSchema-instance" xsi:schemaLocation=
"/xml/ns/javaee
/xml/ns/javaee/web-app_3_1.xsd" version= "3.1" >
< display-name >Archetype Created Web Application
< context-param >
< filter-class>
org.springframework.web.filter.CharacterEncodingFilter
web-app>
3. 配置cxf.xml文件
xml version= "1.0" encoding= "UTF-8" ?>
< beans xmlns=
"/schema/beans"
xmlns:xsi=
"/2001/XMLSchema-instance" xmlns:jaxws= "/jaxws"
xmlns:context=
"/schema/context"
xmlns:jaxrs= "/jaxrs"
xsi:schemaLocation=
"/schema/beans
/schema/beans/sprin
g-beans.xsd
/jaxws
/schemas/jaxws.xsd
/schema/context
/schema/context/spr ing-context.xsd
/jaxrs
/schemas/jaxrs.xsd" >
"classpath:META-INF/cxf/cxf-servlet.xml" /> "org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor" > "org.apache.cxf.jaxws.JaxWsServerFactoryBean" scope= "prototype" >