用弹簧配置骆驼cxf

时间:2019-06-03 12:45:18

标签: java apache-camel cxf

这是我的骆驼代码cxf(camel-context.xml) 我遇到的问题是,我必须知道我的api是REST类型,才必须执行Java代码,我寻找我发现SOAP作为代码,你们中已经有人使用REST API完成了此代码吗?

<cxf:cxfEndpoint 
    id="routeApi" 
    address="http://localhost" 
     serviceClass="org.apache" 
    <cxf:properties>
        <entry key="dataFormat" value="MESSAGE"/>
        <entry key="setDefaultBus" value="true"/>
    </cxf:properties>

<cxf:cxfEndpoint 
    id="serviceApi" 
    address="http://localhost:" 
     serviceClass="org.apache" > 
    <cxf:properties>
        <entry key="dataFormat" value="MESSAGE"/>
        <entry key="setDefaultBus" value="true"/>
    </cxf:properties>

<camelContext xmlns="http://camel.apache.org/schema/spring" 
streamCache="true" id="camel">
<route errorHandlerRef="noErrorHandler"> 
  <from uri="cxf:bean:routeApi"/> 
   <loadBalance>             
        <to uri="cxf:bean:serviceApi"/>
    </loadBalance>
</route>
</camelContext>

0 个答案:

没有答案
相关问题