camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: is it require to keep datatype of inputParams same for all routes??
Date Wed, 18 Apr 2012 07:06:22 GMT

For starters I suggest to see the bean component docs and bean binding docs

On Wed, Apr 18, 2012 at 8:15 AM, bhushand <> wrote:
> I am using camel routes.
> <camel:from uri="direct:startRoute"/>
> <camel:to uri="bean:firstBean?method=method1"/>
> <camel:to uri="bean:SecondBean?method=method2"/>
> <camel:to uri="bean:thirdBean?method=method3"/>
> method1() needs 5-6 different objects for processing so I have formed a Map
> & put required objects in this map. I am passing map using
> ProducerTemplate.sendBody("direct:startRoute",map).
> I am getting all objects in method1() properly, no issue.
> But method2() has signature with input parameter as String, here it is
> giving me conversion error saying "no converter available to convert map to
> String".
> For solving this problem, I put the input param of method2() in map &
> passing this map onward.
> *Here unnecessarily I have to pass Map to all routes.*
> *Is it required that if I am passing an object of one type in sendBody() at
> the start of route then I have to continue with same object for rest of
> routes. *
> I tried for custom converter, but that have to register with camelcontext &
> get applied for all routes.
> How to solve this problem? Please help me.
> Can we have route specific converters? if yes then please tell me how can I
> use it.
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
CamelOne 2012 Conference, May 15-16, 2012:
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message