cxf介绍study
来源:互联网 发布:淘宝激活店铺激活不了 编辑:程序博客网 时间:2024/05/16 05:51
1.首先集成Apacha CXF WebService 到 Spring 框架中;
apache cxf 下载地址:http://people.apache.org/dist/incubator/cxf/2.0.4-incubator/apache-cxf-2.0.4-incubator.zip
在spring context配置文件中引入以下cxf配置
在web.xml中添加过滤器:
2.开发服务端WebService接口:
apache cxf 下载地址:http://people.apache.org/dist/incubator/cxf/2.0.4-incubator/apache-cxf-2.0.4-incubator.zip
在spring context配置文件中引入以下cxf配置
<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" />
在web.xml中添加过滤器:
<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>
2.开发服务端WebService接口:
/*** WebService接口定义类.* * 使用@WebService将接口中的所有方法输出为Web Service.* 可用annotation对设置方法、参数和返回值在WSDL中的定义.*/@WebServicepublic interface WebServiceSample {/*** 一个简单的方法,返回一个字符串* @param hello* @return*/String say(String hello);/*** 稍微复杂一些的方法,传递一个对象给服务端处理* @param user* @return*/String sayUserName(@WebParam(name = "user") UserDTO user);/*** 最复杂的方法,返回一个List封装的对象集合…………………………………………………………………………<p style="COLOR: red; FONT-SIZE: 16px"><strong>来自:<a target=_blank href="http://www.verydemo.com/demo_c143_i29102.html" target="_blank">http://www.verydemo.com/demo_c143_i29102.html</a></strong></p>
0 0
- cxf介绍study
- cxf介绍study
- Apache CXF 介绍
- Apache CXF 介绍
- Apache CXF 介绍
- WebServices之CXF介绍
- WebService之CXF介绍
- study-12 SSH服务介绍
- Apache CXF 介绍(摘录)
- Webservice介绍,CXF入门程序
- WebService(包括CXF)JAVA介绍
- CXF介绍及用 cxf 做的 webservice 简单例子
- study
- study
- study
- study
- STUDY
- Study
- Spring 入门
- 回家爸妈宝贝们,等你?
- 分手理由大全
- 第一个Wayland程序
- 关于手写数字识别的一些调研
- cxf介绍study
- 黑马程序员学习笔记_OC之第1、2、3、4个OC程序
- 要在页面加载完成后才可以改变浏览器的url
- Android开发贴士集合(1)
- jQuery插件之Ajax自动完成
- IOS_UI_day2_UIButton
- 增加windows最大TCP连接随机端口数,避免10048
- 正方形组合而成的多边形的顶点排序算法
- 测试笔记