maven配置 <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-core</artifactId> <version>2.6.1</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxrs</artifactId> <version>2.6.1</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-bundle</artifactId> <version>2.6.1</version> </dependency> web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5" > <context-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/classes/applicationContext.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> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping></web-app> 服务端配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <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" /> <jaxws:endpoint id="helloWorld" implementor="com.demo.HelloWorldImpl" address="/helloWorld" /> </beans> <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" /> 以上文件需要手动添加 客户端配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <!-- 客户端 --> <jaxws:client id="helloServiceClient" serviceClass="com.demo.HelloWorld" address="http://localhost:8080/helloWorld"/> </beans>
相关推荐
CXF+spring+struts实现WebService
CXF+Spring+MyBatis+Maven项目整合,包含服务端和客户端。
maven+spring+cxf+mybatis 搭建的webservice项目
cxf+spring 实现websevice的maven项目,此例子简单,易懂,对刚接触cxf webservice的非常有帮助!
基于maven的cxf+spring简单demo,spring版本为4.1.6,cxf版本为3.0.8
Web项目中基于Maven与Spring整合的WebService之cxf的实现⬇️ 详情请参考如下链接: https://locqi.github.io/locqi.com/2018/09/05/Eclipse+Maven+Spring+CXF-create-WebService/
idea+maven+spring+cxf
springMVC3+apache CXF+spring security3+mybatis3(proxool)整合项目demo,主要是配置文件组成,和security扩展
CXF+Spring整合资料 包含demo ,服务器端代码编写说明以及客户端代码。包含正常使用所需要的jar文件以及Maven导入jar文件的配置说明
ibatis+spring+cxf+mysql搭建webservice的客户端,文章地址在http://blog.csdn.net/cenyi2013/article/details/17315755. 服务端源码的下载地址在http://download.csdn.net/detail/cenyi2012/6712729
本实例是一个简单的Spring+Apache CXF+MyBatis+Maven的集成小项目,可以最为学习参考,程序说明在我的博客里面有,链接地址:http://blog.csdn.net/liuxing9345/article/details/77983755
这是一个关于cxf的小例子,包括服务器端的发布和客户端的访问。也有整合spring的例子,欢迎下载指正。
Struts2+Spring3+Hibernate4+Maven+EasyUI+CXF 整合,包含对项目介绍的DOC文档
webservice=maven+spring+cxf we服务端+java客户端代码
maven+spring+cxf 的webservice开发源码,欢迎大家指点,谢谢
蛮简陋的一个项目,适合新手使用。 这是一个包含简单登录和查询的Web项目,内附有一个表sql文件和两个java项目。 ...WS_Client是客户端,是一个project项目,内部有一个WebService的测试类,用来测试从服务端取得数据
Maven+Spring+Spring MVC+MyBatis+MySQL整合SSM框架; 已集成activeMq;cxf webservice;邮件;
Eclipse下Maven+Spring+CXF 构建webservice 服务,包含详细代码,完整的maven项目,内附说明,需要可以下载查看
cxf spring maven 实例 webservice
自己在网上找了很多cxf实现rest风格...现在把源码发上来,java代码只有12K,主要是lib里面的全部jar包(spring、cxf等全部的jar包), 文章地址:http://blog.csdn.net/lxn39830435731415926/article/details/39448887