我正在使用apache cxf和camel制作restful风格的cxf服务。我的配置如下所示:
<camelcxf:rsServer id="applicationserver" address="/" staticSubresourceResolution="true">
<camelcxf:serviceBeans>
<ref bean="Demo" />
<ref bean="Foo" />
<ref bean="Bar" />
</camelcxf:serviceBeans>
</camelcxf:rsServer>我将三个服务bean公开为服务,并映射到不同的urls,路由如下所示:
<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,我希望有不同的路由,因为这三个bean都有不同的功能,但我无法确定应该在
<from: uri="cxfrs://bean://aplicationserver..."/> 标签根据服务bean来区分路由。还有没有其他方法可以做到这一点?请给我一些建议。
发布于 2012-12-15 06:10:27
你看过Camel CXFRS documentation了吗?他们在示例中采用的方法是让一个路由充当“全部捕获”,然后根据以下值采取不同的操作:
String operationName = exchange.getIn()
.getHeader(CxfConstants.OPERATION_NAME, String.class);https://stackoverflow.com/questions/10497174
复制相似问题