gusto2

ServiceMix Cxf JAXRS blueprint

Oct 5th, 2013
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.76 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <blueprint
  3.    xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
  4.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5.    xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
  6.    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
  7.    xsi:schemaLocation="
  8.        http://www.osgi.org/xmlns/blueprint/v1.0.0                    http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
  9.        http://camel.apache.org/schema/cxf                            http://camel.apache.org/schema/cxf/camel-cxf.xsd
  10.        http://camel.apache.org/schema/blueprint                      http://camel.apache.org/schema/blueprint/camel-blueprint.xsd  
  11.        http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0   http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0  
  12.        http://cxf.apache.org/blueprint/core                          http://cxf.apache.org/schemas/blueprint/core.xsd
  13.        http://cxf.apache.org/blueprint/jaxws                         http://cxf.apache.org/schemas/blueprint/jaxws.xsd
  14.        http://cxf.apache.org/blueprint/jaxrs                         http://cxf.apache.org/schemas/blueprint/jaxrs.xsd">
  15.    
  16.     <cm:property-placeholder persistent-id="com.apogado.xxxx" update-strategy="reload">
  17.         <cm:default-properties>
  18.             <cm:property name="locServicesRealm" value="karaf" />
  19.             <cm:property name="locServicesRoles" value="user" />
  20.         </cm:default-properties>
  21.     </cm:property-placeholder>
  22.  
  23.    
  24.     <!-- ============== LOCATION SERVICES ================= -->
  25.    
  26.     <jaxrs:server id="locationRsServices" address="/internal/location">
  27.         <jaxrs:serviceBeans>
  28.             <ref component-id="locationServicesRs" />
  29.         </jaxrs:serviceBeans>
  30.         <jaxrs:providers>
  31.             <ref component-id="authenticationFilter"/>
  32.         </jaxrs:providers>
  33.     </jaxrs:server>
  34.      
  35.     <bean id="authenticationFilter" class="org.apache.cxf.jaxrs.security.JAASAuthenticationFilter">
  36.         <!-- Name of the JAAS Context -->
  37.         <property name="contextName" value="${locServicesRealm}"/>
  38.         <property name="realmName" value="${locServicesRealm}"/>
  39.         <!-- Hint to the filter on how to have Principals representing users and roles separated
  40.        while initializing a SecurityContext -->
  41.         <property name="rolePrefix" value="${locServicesRoles}"/>
  42.     </bean>
  43.  
  44.     <bean id="locationServicesImpl" class="com.apogado.egov.cache.address.LocationServices">
  45.         <property name="datasource" ref="cacheDataSource" />
  46.     </bean>
  47.  
  48.     <bean id="locationServicesRs" class="com.apogado.egov.cache.address.LocationServiceRs">
  49.         <property name="locServices" ref="locationServicesImpl"/>
  50.     </bean>
  51.      
  52.    
  53. </blueprint>
Advertisement
Add Comment
Please, Sign In to add comment