- 18
- 0
- 约5.94千字
- 约 5页
- 2016-10-20 发布于重庆
- 举报
通过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
???????
您可能关注的文档
最近下载
- 专题23 阅读理解(科普和文化)-备战中考英语高能训练(原卷版).docx VIP
- 中考数学模型 专题2.7 二次函数中的最值问题(学生版+解析版).docx
- 排水管理与排水设施建设管理的调研报告5.docx
- 中职物理探究磁现象及其应用教案.pdf
- 中考数学模型 专题2.6 逆等线模型(学生版+解析版) .docx
- 中职物理探究磁现象及其应用教学实施报告.pdf VIP
- 《3T模锻电液锤液压系统的设计》-毕业学术论文(设计).doc VIP
- 2025年放射法律法规及防护知识培训试题及答案.docx VIP
- (正式版)D-L∕T 517-2012 电力科技成果分类与代码.docx VIP
- 3.3.1 查对制度(word完结版).docx VIP
原创力文档

文档评论(0)