Hi

What version of Camel are you using?

Looks like we should have had another excpetion being thrown when end
user provided the method name to invoke but it does not exist.


On Tue, Jun 16, 2009 at 3:12 AM, Willem Jiang<[email protected]> wrote:
> 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...
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to