apache-cxf-2.6.3 spring集成配置

apache-cxf-2.6.3
 <?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"
 xmlns:jaxrs="http://cxf.apache.org/jaxrs"
 xsi:schemaLocation="
  http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
     http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
     http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
     http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
 <jaxrs:server id="xx" address="/xx/api">
  <jaxrs:serviceBeans> 
   <ref bean="xx"/>
        </jaxrs:serviceBeans>
 
 <jaxrs:inInterceptors>
   <ref bean="serverInterceptor"/>
  </jaxrs:inInterceptors>
  
  <jaxrs:providers>
         <ref bean="jsonProvider"/>
         <ref bean="errorHandlerProvider"/>         
        </jaxrs:providers>
 </jaxrs:server>
 
 <bean id="serverInterceptor" class="xx.RestServerInterceptor">
 </bean>
 <!--客户端拦截器-->
 <bean id="clientInterceptor" class="xx.RestClientInterceptor"></bean>
 
 <jaxrs:client id="messageRestService" address="http://xx"
  serviceClass="xx" inheritHeaders="true" >
  <jaxrs:outInterceptors> 
   <ref bean="clientInterceptor"/>
  </jaxrs:outInterceptors>
  <jaxrs:providers>
      <ref bean="jsonProvider"/>
     </jaxrs:providers>
 </jaxrs:client> 
  <jaxws:client id="xx" address="${xx}"
  serviceClass="xx.IQueryWebService">
 </jaxws:client>  
</beans>

@Path("/xx")
@Produces("application/json")
@Consumes("application/json")
public interface Iervice {
 @GET
 @Path("listAz/page/{pageSize}/{curPage}")
 public xx<xx> xx(@QueryParam("") xx computeVO, @PathParam("") xx xx)throws  Exception;
}

apache-cxf-2.6.3 spring集成配置

时间: 2024-07-29 20:01:19

apache-cxf-2.6.3 spring集成配置的相关文章

CXF框架介绍及Spring集成

1.CXF框架概念介绍 Apache CXF 是一个开源的 WebService 框架,CXF可以用来构建和开发 WebService,这些服务可以支持多种协议,比如:SOAP.POST/HTTP.HTTP ,CXF 大大简化了WebService并且可以天然地和 Spring 进行无缝集成.CXF是 Celtrix (ESB框架)和 XFire(webserivice) 合并而成,核心是org.apache.cxf.Bus(总线),类似于Spring的 ApplicationContext,C

MQ原理、使用场景、IBM WebSphere MQ介绍及spring集成配置

一.MQ简介及特点 MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法.应用程序通过写和检索出入列队的针对应用程序的数据(消息)来通信,而无需专用连接来链接它们.消息传递指的是程序之间通过在消息中发送数据进行通信,而不是通过直接调用彼此来通信,直接调用通常是用于诸如远程过程调用的技术.排队指的是应用程序通过队列来通信.队列的使用除去了接收和发送应用程序同时执行的要求.其中较为成熟的MQ产品有IBM WebSphere MQ.RabbitMQ .ZeroMQ

RabbitMQ与Spring集成配置

1.引入相关jar包 //RabbitMQ compile group: 'org.springframework.amqp', name: 'spring-rabbit', version: '1.6.6.RELEASE'compile group: 'org.springframework.integration', name: 'spring-integration-amqp', version: '4.3.5.RELEAS 生产者配置 2.实现一个消息处理器,继承自org.springf

Redis与Spring集成配置

<?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:p="http://www.springframework.org/schema/p&

ibatis 开发中的经验 (三)ibatis与spring2集成配置

ibatis项目中用到了一些基本配置,需要和spring集成,看了看这些配置大部分同hibernate中是一样的,也比较好理解,只是需要他们的配置中每个类的含义,还有其中的一些细节还是需要我们了解的,知识不在多,而在不断吸收和重复,在使用和练习中加深对各种问题的理解. 读取属性文件配置 <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceho

重构Mybatis与Spring集成的SqlSessionFactoryBean(上)

一般来说,修改框架的源代码是极其有风险的,除非万不得已,否则不要去修改.但是今天却小心翼翼的重构了Mybatis官方提供的与Spring集成的SqlSessionFactoryBean类,一来是抱着试错的心态,二来也的确是有现实需要. 先说明两点: 通常来讲,重构是指不改变功能的情况下优化代码,但本文所说的重构也包括了添加功能 本文使用的主要jar包(版本):spring-*-4.3.3.RELEASE.jar.mybatis-3.4.1.jar.mybatis-spring-1.3.0.jar

spring boot 集成 Apache CXF 调用 .NET 服务端 WebService

1. pom.xml加入 cxf 的依赖 <!-- https://mvnrepository.com/artifact/org.apache.cxf/cxf-rt-frontend-jaxws --> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>2.7.18&l

spring集成Log4j以及log4j配置简要说明

Spring集成: web.xml中配置log4j <context-param> <param-name>log4jConfigLocation</param-name> <param-value>WEB-INF/log4j.xml</param-value></context-param> <!-- 加载Spring框架中的log4j监听器Log4jConfigListener --><listener>

Apache cxf 整合 Spring MVC

1.添加依赖pom.xml <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://maven.apache.o