Advertisement
ceefour

CXF blueprint OSGi JAX-RS

Aug 29th, 2012
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.00 KB | None | 0 0
  1. <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
  2.    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
  3.    xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
  4.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  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="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
  9.        http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0
  10.        http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0 http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0
  11.         http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
  12.         http://cxf.apache.org/blueprint/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
  13.         http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd">
  14.  
  15.     <cxf:bus>
  16.         <cxf:features>
  17.             <cxf:logging />
  18.         </cxf:features>
  19.     </cxf:bus>
  20.    
  21.     <reference id="salesOrderRawRepo" interface="id.co.bippo.sales.order.hand.SalesOrderRawRepository"/>
  22.  
  23.     <bean id="salesOrderRs" class="id.co.bippo.sales.order.rs.hand.SalesOrderResource">
  24.         <argument ref="salesOrderRawRepo"/>
  25.     </bean>
  26.    
  27.     <reference id="jacksonMapperFactory" interface="com.google.common.base.Supplier"
  28.         filter="(className=com.fasterxml.jackson.databind.ObjectMapper)"/>
  29.  
  30.     <jaxrs:server id="apiRs" address="/api">
  31.         <jaxrs:providers>
  32.             <bean class="com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider"/>
  33.             <bean class="org.soluvas.jaxrs.Jackson2ContextResolver">
  34.                 <argument ref="jacksonMapperFactory"/>
  35.             </bean>
  36.         </jaxrs:providers>
  37.        
  38.         <jaxrs:serviceBeans>
  39.             <ref component-id="salesOrderRs" />
  40.             <bean class="id.co.bippo.sales.order.rs.hand.PersonResource"/>
  41.         </jaxrs:serviceBeans>
  42.     </jaxrs:server>
  43.  
  44. </blueprint>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement