On Thu, Jun 18, 2009 at 8:34 AM, Claus Ibsen <[email protected]> wrote:

>
>
> On Tue, Jun 16, 2009 at 6:33 AM, Claus Ibsen <[email protected]>wrote:
>
>> 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.
>
>
> Works fine in Camel 2.0. I added an unit test for
> it: BeanWithMethodHeaderTest
>

Sorry was to fast. When you have explict given a method name Camel should of
course thrown an exception if the method 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
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>


-- 
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