通过CXF开发webService接口(soap协议maven项目).docVIP

  • 18
  • 0
  • 约5.94千字
  • 约 5页
  • 2016-10-20 发布于重庆
  • 举报

通过CXF开发webService接口(soap协议maven项目).doc

通过CXF开发webService接口(soap协议maven项目)

1. 引入cxf的jar包 ? pom文件里面直接增加依赖 ? ? ? dependency ? ? ? ? ? groupId junit/ groupId ? ? ? ? ? artifactId junit/ artifactId ? ? ? ? ? version 4.11 /version ? ? ? ? ? scope test /scope ? ? ? /dependency ? ? ? dependency ? ? ? ? ? groupId org.springframework /groupId ? ? ? ? ? artifactId spring- webmvc/ artifactId ? ? ? ? ? version 4.0.0.RELEASE?/version ? ? ? /dependency ? ? ? dependency ? ? ? ? ? ?groupId org.apache.cxf /groupId ? ? ? ? ? ?artifactId apache-cxf /artifactId ? ? ? ? ? ?version 2.4.3/version ? ? ? ? ? ?type pom/ type ? ? ? /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 /display-name ? context-param ??????????? param-name contextConfigLocation /param-name ?????????? param-value classpath:config/spring/metadataWebService-spring.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 ????? /servlet ????? servlet-mapping ??????????? servlet-name CXFServlet /servlet-name ??????????? url-pattern /services/* /url-pattern ????? /servlet-mapping ????? filter ??????? filter-name encodingFilter /filter-name ??????? filter-class org.springframework.web.filter.CharacterEncodingFilter /filter-class ??????? init-param ??????????? param-name encoding /param-name ??????????? param-value UTF-8 /param-value ??????? /init-param ??????? init-param ??????????? param-name forceEncoding /param-name ??????????? param-value true /param-value ??????? /init-param ??? /filter ??? filter-mapping ??????? filter-name encodingFilter /filter-name ???????

文档评论(0)

1亿VIP精品文档

相关文档