CXF route in blueprint with policy and sts

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CXF route in blueprint with policy and sts

Oliver Wulff
Hi there

I've created a simple route in blueprint from cxf endpoint to another cxf endpoint. When I deploy this in Karaf the bundle stays in "GracePeriod" and the following exception is logged:

2013-11-18 16:06:36,556 | INFO  | Thread-842       | BlueprintContainerImpl           | container.BlueprintContainerImpl  303 | 7 - org.apache.aries.blueprint.core - 1.1.0 | Bundle route1 is waiting for namespace handlers [http://cxf.apache.org/blueprint/policy]

This is a snippet of my blueprint definition:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:p="http://cxf.apache.org/blueprint/policy"
           xmlns:wsp="http://www.w3.org/ns/ws-policy"
           xmlns:cxfcamel="http://camel.apache.org/schema/blueprint/cxf"
           xmlns:cxf="http://cxf.apache.org/blueprint/core"
           xsi:schemaLocation="
               http://www.osgi.org/xmlns/blueprint/v1.0.0
               http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
               http://cxf.apache.org/blueprint/policy
               http://cxf.apache.org/schemas/blueprint/policy.xsd
               http://www.w3.org/ns/ws-policy
               http://www.w3.org/2007/02/ws-policy.xsd
               http://cxf.apache.org/blueprint/core
               http://cxf.apache.org/schemas/blueprint/core.xsd
               http://camel.apache.org/schema/blueprint/cxf
               http://camel.apache.org/schema/cxf/camel-cxf-2.12.0-blueprint.xsd
               http://camel.apache.org/schema/blueprint
               http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">

  <cxf:bus>
    <cxf:features>
      <cxf:logging />
    </cxf:features>
  </cxf:bus>

  <cxfcamel:cxfEndpoint id="proxyCRMEndpoint"
      wsdlURL="wsdl/CRMServiceProxy.wsdl"
      xmlns:ns="http://services.talend.org/CRMService"
      endpointName="ns:CRMServicePortProxy"
      serviceName="ns:CRMServiceProviderProxy">
    <cxfcamel:features>
      <p:policies>
          <wsp:PolicyReference URI="classpath:/ut.policy" />
      </p:policies>
    </cxfcamel:features>
    <cxfcamel:properties>
      <entry key="schema-validation-enabled" value="false" />
      <entry key="ws-security.ut.validator" value="org.apache.cxf.ws.security.trust.STSTokenValidator" />
      <entry key="ws-security.sts.client">
        <bean class="org.apache.cxf.ws.security.trust.STSClient">
          <argument ref="cxf"/>
          <property name="wsdlLocation" value="http://localhost:8040/services/SecurityTokenService/UT?wsdl"/>
          <property name="serviceName"
                    value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
          <property name="endpointName"
                    value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}UT_Port"/>
          <property name="tokenType" value="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"/>
        </bean>
      </entry>
    </cxfcamel:properties>
  </cxfcamel:cxfEndpoint>

I've found several namespace for cxf schemas. In CXF there is one for spring, one for blueprint, for some there is a counterpart in camel and as well one for camel blueprint. This is a little bit confusing.

For CXF there are several schemas in Camel:
http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd
http://camel.apache.org/schema/cxf/camel-cxf.xsd
http://camel.apache.org/schema/cxf/camel-cxf-2.12.0-blueprint.xsd

Which is the right one to use and which do I have to use for policy to resolve the issue with the namespace handler?

Thanks a lot
Oli