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.

Reply via email to