2009/7/14 Charles Moulliard <[email protected]>: > If I annotate one of them : the one annotated is executed but the other is > missed in the route > > Is this syntax correct : > > from(file) > .to(beanA) // Create Request > .to(beanB) // parse request > .to(queueA) > > from(queueA) > .to(beanC) // validate request > .to(beanD method="updateStatus") > .to(queueB) > > ... > > from(queueX) > .to(beanX) > .to(beanD method="updateStatus") > > public class beanD { > > �...@handler > public void updateStatus(@Body Request request) { > > } > > public void updateStatus(@Body Report report, @Header( value="requestId" > ) String requestId) { > > } > }
This thread is feeling a bit like the goal posts keep moving. With the above, if the payload of the message is a Request or Report then camel should pick the right one. However your exception showed no such thing... Exception: org.apache.camel.component.bean.AmbiguousMethodCallException: Ambiguous method invocations possible: [public java.util.List com.xpectis.x3s.core.util.ServiceHelper.updateRequestStatus(java.lang.String,java.lang.String,java.util.List), public void com.xpectis.x3s.core.util.ServiceHelper.updateRequestStatus(java.lang.String,java.lang.String,java.lang.String,org.apache.camel.Exchange)] What was the exception when you tried to use the 2 methods in this latest message - and what was the type of the payload? -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/
