# cxf3-spring-integration **Repository Path**: itmuch-demo/cxf3-spring-integration ## Basic Information - **Project Name**: cxf3-spring-integration - **Description**: CXF3 整合spring 4 包含一个soap的示例和一个restful的示例 其中restful 包含生成wadl等等 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 10 - **Created**: 2015-08-21 - **Last Updated**: 2022-04-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #CXF3 整合 spring4 ## 代码包含: 1. 一个soap的demo 2. 一个rest的demo ## 使用方法: 1. checkout代码 2. 将代码导入eclipse中 3. mvn clean package 打包项目 4. mvn tomcat7:run 运行项目 ## 查看结果: ### URL: - http://localhost:9090/cxf/api ### SOAP - WSDL: http://localhost:9090/cxf/api/soap/user?wsdl ### REST - WADL: http://localhost:9090/cxf/api/jaxrs?_wadl - 返回xml: http://localhost:9090/cxf/api/jaxrs/user/1.xml - 返回json: http://localhost:9090/cxf/api/jaxrs/user/1.json ### 遇到的问题: #### 解决使用tomcat启动时报错, 原因: 1. 需要排除掉jaxb-impl, 在JDK6之后, 都自带了JAXB工具. 否则在tomcat中会报错 2. 参考文档: http://www.cnblogs.com/likehua/archive/2011/05/25/2057377.html 3. 详见pom.xml #### 解决CXF3 无法生存WADL文件的问题 1. cxf2.x直接可以生成wadl, 但是使用CXF3.x就不行, 需要引入: jackson-jaxrs-json-provider的依赖 2. 参考文档: http://cxf.apache.org/docs/30-migration-guide.html 3. 里面有写: JAX-RS WADL auto-generation code has been moved to a new cxf-rt-rs-service-description module. 4. 详见pom.xml ### 捐助我 ![输入图片说明](http://git.oschina.net/uploads/images/2015/0821/155643_79592a84_489974.png "在这里输入图片标题")