Hi

The beanRef(String ref, String method) 's method parameter is the method
name, it doesn't include the method parameter types.
So you just need to change your route rule like this

from("activemq:queue:purchaseorder:transid").beanRef("purchaseOrderService",
"getByTransId");

from("activemq:queue:purchaseorder:externalId").beanRef("purchaseOrderService",
 "getByExternalId");

Willem

buzzterrier wrote:
> Hello,
> 
> I have the following routes:
> 
> 
> public void configure() throws Exception {
>       
> from("activemq:queue:purchaseorder:transid").beanRef("purchaseOrderService",
> "getByTransId(String)");
>       
> from("activemq:queue:purchaseorder:externalId").beanRef("purchaseOrderService",
> "getByExternalId(String)");
>       }
> 
> 
> 
> and I call it using:
> 
>       PurchaseOrder po = (PurchaseOrder)
> camelTemplate.sendBody("activemq:queue:purchaseorder:transid",
>             ExchangePattern.InOut, poid);
>               System.out.println("POID: " + po.getTranId());
> 
> 
> The server throws and AmbiguousMethodCallException.  I thought the
> activemq:queue:purchaseorder:transid route would differentiate the method
> call from activemq:queue:purchaseorder:externalId. Am I going about this the
> wrong way?
> 
> -----
> Buzzterrier
> 
> http://buzzterrier.blogspot.com/ View my blog: Ordinary Average Developer... 

Reply via email to