今天看了一个ibm的cxf教学文章,同时看了samples里面例子,对pojo的方式不太明白,在je里查了之后才知道cxf支持两种服务实现 POJO和JSR181标记过(Annoatated)的Java类,同时在cxf-servlet.xml里面的配置也略有不同
<beans xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<jaxws:server id="jaxwsService" serviceClass="demo.hw.server.HelloWorld" address="/hello_world">
<jaxws:serviceBean>
<bean class="demo.hw.server.HelloWorldImpl"/>
</jaxws:serviceBean>
</jaxws:server>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:simple="http://cxf.apache.org/simple"
xmlns:soap="http://cxf.apache.org/bindings/soap"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/simple http://cxf.apache.org/schemas/simple.xsd">
<simple:server id="pojoservice" serviceClass="demo.hw.server.HelloWorld" address="/hello_world">
<simple:serviceBean>
<bean class="demo.hw.server.HelloWorldImpl" />
</simple:serviceBean>
</simple:server>
</beans>
其中annotation的方式更灵活一些,但是pojo的方式简单,容易理解一些,各有千秋啊!
分享到:
相关推荐
CXF学习笔记.docx ) CXF学习笔记.docx ) CXF学习笔记.docx ) CXF学习笔记.docx ) CXF学习笔记.docx ) CXF学习笔记.docx ) CXF学习笔记.docx )
Apache cxf 学习笔记.pdfApache cxf 学习笔记.pdf
cxf学习笔记.详细的描述了我学习cxf的过程.服务端采用 cxf+spring的方式;客户端采用spring+struts的方法。内容如下 1:最简单的hello world 2:集合类的传输 3:大数据的传输(上传下载) 4:安全性 4.1:用户令牌...
CXF例子 创建服务端、客户端、相关xml的配置和环境jar说明
Apache cxf 学习笔记,供大家参考
NULL 博文链接:https://ll-feng.iteye.com/blog/558518
Axis2版本学习笔记,CXF版学习笔记,WebServices学习笔记
CXF 包含了大量的功能特性,但是主要集中在以下几个方面: 支持 Web Services 标准:CXF 支持多种 Web Services 标准,包含 SOAP、Basic Profile、WS-Addressing、WS-Policy、WS-ReliableMessaging 和 WS-Security。...
Apache_cxf_学习笔记,学习cxf技术,以及有关webservice接口的使用
【精品文档】基于cxf webservice传递List及bean.pdf CXF学习笔记.doc 使用Apache CXF开发Web Service.pdf 如何使用myeclipse开发 webservice
CXF 是Celtix + Xfire的结合体,Apache CXF 的前身叫 Apache CeltiXfire,现在已经正式更名为 Apache CXF 了。CXF 继承了 Celtix 和 XFire 两大开源项目的精华,提供了对 JAX-WS 全面的支持,并且提供了多种 Binding...
Java+WebService利用(cxf)开发笔记,里面有非常好的学习实例,是入门学生的非常好的资料
NULL 博文链接:https://wxl-1988.iteye.com/blog/1430030
cxf框架的基本使用以及注意的地方,soap、wsdl的理解
记录文件夹的 "zip export" 事件; 文件夹搜索现在 case-insenstive; 修复了 Ticket 下载(文件名,编码 IE 11); 修复了移动文档到文件夹,不需要读权限; 修复了文档预览只能看到第一页的问题。 ...
基于SpringBoot + Spring + Apache CXF +Mybatis 开发SOAP的 WebService 服务 # 备注 | **版本** | **说明**| | ------ |:------:| | 1.0.0版本| | | 2.0.0版本|springboot启动| # 原理 Mybatis基于动态代理实现...