Once the message is routing to the next endpoint, you should be able to tell 
the operation by looking up the message header of "operationName", then you can 
use the CBR[1] to do the work as you want.

.when(header("operationName").isEqualTo("reportCriticalIncidents")).to(direct:route1)
.when(header("operationName").isEqualTo("reportSmallIncidents")).to(direct:route2)

[1]http://camel.apache.org/content-based-router.html 

-- 
Willem Jiang


On Wednesday, August 8, 2012 at 2:39 PM, anupamsen wrote:

> Hi There,
> 
> I have a similar short of issue. The problem is with the producer end. That
> is the from side of the route I want to chose an operation.
> 
> <route>
> 
> <from uri="cxf:bean:reportIncident"/>
> .....
> </route>
> 
> Camel allows having only one endpoint at a single address like the
> following-
> 
> <cxf:cxfEndpoint id="reportIncident"
> 
> address="http://localhost:${proxy.port}/camel-example-cxf-proxy/webservices/ReportIncident";
> endpointName="s:ReportIncidentEndpoint"
> serviceName="s:ReportIncidentEndpointService"
> wsdlURL="etc/report_incident.wsdl"
> xmlns:s="http://reportincident.example.camel.apache.org";>
> <cxf:properties>
> 
> But, in the endpoint I may have multiple operations (eg.
> reportCriticalIncidents, reportSmallIncidents etc.). I want to trigger
> different workflow based on the method being called rather than have a
> single entry point for the entire web service. Does camel provide facility
> to route based on the method/operation of an endpoint?
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/How-Do-We-Specify-Operation-To-Choose-In-Camel-CXf-tp474620p5716965.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).
> 
> 


Reply via email to