Java ApacheCamel:CXFRS服务器:需要路由建议吗

Java ApacheCamel:CXFRS服务器:需要路由建议吗,java,rest,apache-camel,cxfrs,Java,Rest,Apache Camel,Cxfrs,我正在使用ApacheCXF和camel制作restful Web服务。我的配置如下: <camelcxf:rsServer id="applicationserver" address="/" staticSubresourceResolution="true"> <camelcxf:serviceBeans> <ref bean="Demo" /> <ref bean="Foo" /> <ref bean="Bar" /> <

我正在使用ApacheCXF和camel制作restful Web服务。我的配置如下:

<camelcxf:rsServer id="applicationserver" address="/" staticSubresourceResolution="true">
<camelcxf:serviceBeans>
<ref bean="Demo" />
<ref bean="Foo" />
<ref bean="Bar" />
</camelcxf:serviceBeans>
</camelcxf:rsServer>
<camel:route id="ServerRoute">
<camel:from uri="cxfrs://bean://applicationserver" />           
<camel:process ref="camelCxfInProcessor" />
<camel:to uri="http://google" />
<camel:to uri="bean:googlereqreshandler" />
我有三个作为服务公开的服务bean,它们被映射到不同的URL,路由如下:

<camelcxf:rsServer id="applicationserver" address="/" staticSubresourceResolution="true">
<camelcxf:serviceBeans>
<ref bean="Demo" />
<ref bean="Foo" />
<ref bean="Bar" />
</camelcxf:serviceBeans>
</camelcxf:rsServer>
<camel:route id="ServerRoute">
<camel:from uri="cxfrs://bean://applicationserver" />           
<camel:process ref="camelCxfInProcessor" />
<camel:to uri="http://google" />
<camel:to uri="bean:googlereqreshandler" />
现在,对于每个服务bean,我希望有不同的路由,因为这三个都有不同的功能,但我无法确定应该在

<from: uri="cxfrs://bean://aplicationserver..."/> 
标记以根据服务bean区分路由。或者还有其他的方法吗?请提些建议。

你看过报纸了吗?他们在本例中采用的方法是,使用一条路线作为“一网打尽”,然后根据以下值采取不同的行动:

String operationName = exchange.getIn()
                       .getHeader(CxfConstants.OPERATION_NAME, String.class);
你看过报纸了吗?他们在本例中采用的方法是,使用一条路线作为“一网打尽”,然后根据以下值采取不同的行动:

String operationName = exchange.getIn()
                       .getHeader(CxfConstants.OPERATION_NAME, String.class);

将同一问题发布在:将同一问题发布在: