Hi You must have build the method wrong, in the for loop. Make sure its built correctly.
I just added a test to trunk that works with 3 parameters http://svn.apache.org/viewvc?rev=1213597&view=rev On Mon, Dec 12, 2011 at 5:49 PM, m.jimen.blazquez <m.jimen.blazq...@gmail.com> wrote: > Hi, > > I have converted the route to an endpoint route: > > public String slip(MessageContentsList body){ > > String route = ""; > if (condition){ > message = "bean:orderServiceRest?method=buy("; > > for (int i = 0 ; i < body.size() ; i++){ > route = route + "${body[" + i + "]},"; > } > route = route.substring(0, route.lastIndexOf(',')); > route = route + "\")"; > return route; // returns > "bean:orderServiceRest?method=buy(${body[0]},${body[1]},${body[2]})" > } > > but I obtain this error: > > WebApplicationException has been caught : Name must have both starting and > ending parenthesis, was: buy(${body[0]} > > I have checked several times the parenthesis and they are ok. > > I have simulated a call with no arguments and it worked fine, but with > several arguments it throws the exception. > > I am using the 2.9 release candidate of camel. > > I am missing something? > > Kindest regards > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Dynamic-Routing-tp5068570p5068896.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: cib...@fusesource.com Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/