Advertisement
gusto2

JAXRS client/server OSGi blueprint

Oct 22nd, 2014
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.28 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
  3.           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
  5.           xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
  6.           xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
  7.           xmlns:cxf="http://cxf.apache.org/blueprint/core"
  8.           xsi:schemaLocation="
  9.             http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
  10.             http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
  11.             http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
  12.             http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
  13.             ">
  14.  
  15.     <cxf:bus>
  16.         <cxf:features>
  17.             <cxf:logging/>
  18.         </cxf:features>
  19.     </cxf:bus>
  20.    
  21.     <bean id="jsonProvider1" class="org.apache.cxf.jaxrs.provider.json.JSONProvider">
  22.         <property name="dropRootElement" value="true" />
  23.         <property name="dropElementsInXmlStream" value="true" />
  24.         <property name="dropCollectionWrapperElement" value="true" />
  25.         <property name="writeXsiType" value="false" />
  26.         <property name="supportUnwrapped" value="true" />
  27.        
  28.     </bean>
  29.    
  30.     <!--<bean id="jsonProvider2" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>-->
  31.  
  32.    
  33.     <jaxrs:client id="jaxrsClient" address="http://reqr.es" serviceClass="com.aopgado.test.asyncrs.data.RegresApiInterface">
  34.         <jaxrs:providers>
  35.             <ref component-id="jsonProvider1" />
  36.         </jaxrs:providers>
  37.     </jaxrs:client>
  38.      
  39.     <bean id="clientBean" class="com.aopgado.test.asyncrs.ClientTest" init-method="test">
  40.         <property name="rsClient" ref="jaxrsClient" />
  41.     </bean>
  42.  
  43.    
  44.    
  45.     <jaxrs:server id="rsServer" address="/rstest" >
  46.         <jaxrs:serviceBeans>
  47.             <bean class="com.aopgado.test.asyncrs.TestServer" >
  48.             </bean>
  49.         </jaxrs:serviceBeans>
  50.         <jaxrs:providers>
  51.             <ref component-id="jsonProvider1" />
  52.         </jaxrs:providers>
  53.     </jaxrs:server>
  54.      
  55. </blueprint>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement