2

blueprint、apache camel、および apache cxf-rs を使用してレスト サービスを開発しようとしています。サービスの実装は camel によって処理されます。

問題は、残りのエンドポイントがラクダに割り当てられないように見えることです。

これは私が得る例外です:

Camel の起動中にエラーが発生しました: CamelContext(blueprintContext) due エンドポイントが既に /crm で実行されています。

私の青写真は次のとおりです。

<?xml version="1.0" encoding="UTF-8"?>

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs"
xmlns:cxf="http://cxf.apache.org/blueprint/core"
xmlns:camel="http://camel.apache.org/schema/blueprint"
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/jaxrs http://cxf.apache.org/schemas/blueprint/jaxrs.xsd
  http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
  http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">


<jaxrs:server id="customerService" address="/crm" staticSubresourceResolution="true">
    <jaxrs:serviceBeans>
        <ref component-id="customerSvc"/>
    </jaxrs:serviceBeans>
    <jaxrs:features>
        <bean class="io.fabric8.cxf.endpoint.SwaggerFeature"/>
        <bean class="io.fabric8.cxf.endpoint.ManagedApiFeature"/>
    </jaxrs:features>
    <jaxrs:providers>
       <bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>
    </jaxrs:providers>
</jaxrs:server>




<bean id="customerSvc" class="restfuse.CustomerService"/>

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



<camelContext id="blueprintContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
<route customId="true" id="timerToLog">
    <from uri="cxfrs:bean:customerService"/>
    <setBody>
        <method ref="helloBean" method="hello"></method>
    </setBody>
    <log message="The message contains ${body}"/>
    <to uri="mock:result"/>
</route>

4

2 に答える 2