Hi

I can reproduce the issue and have created a ticket
https://issues.apache.org/jira/browse/CAMEL-4773



On Tue, Dec 13, 2011 at 10:45 AM, m.jimen.blazquez
<[email protected]> wrote:
> Hi,
>
> I have reduced my code to the simplest code.
>
> This code goes perfectly:
>
> <route>
>        <camel:from uri="cxfrs:/exchange2...." />
>        <camel:bean ref="orderServiceRest" method="buy('symbol', 'quantity',
> 'price')" />
> </route>
>
> but this one goes wrong:
>
> <route>
>        <camel:from uri="cxfrs:/exchange2...." />
>        <camel:dynamicRouter>
>                <method ref="routeHelper" method="slip" />
>        </camel:dynamicRouter>
> </route>
>
> public class RouteHelper{
>        int i = 0;
>        public String slip(MessageContentsList body){
>                if (i==0){
>                        i  ;
>                        return
> "bean:orderServiceRest?method=buy('symbol','quantity','price')";
>                }
>                else
>                        return null;
> }}
>
> throwing the exception:
>
> WebApplicationException has been caught : Name must have both starting and
> ending parenthesis, was: buy('symbol'
>
> I have also tested this case:
>
> <route>
>        <camel:from uri="cxfrs:/exchange2...." />
>        <camel:dynamicRouter>
>                <method ref="routeHelper" method="slip" />
>        </camel:dynamicRouter>
> </route>
>
> public class RouteHelper{
>        int i = 0;
>        public String slip(MessageContentsList body){
>                if (i==0){
>                        i  ;
>                        return "bean:orderServiceRest?method=buy('symbol')";
>                }
>                else
>                        return null;
> }}
>
> and it goes perfectly.
>
> I don't know what I am doing wrong, but I would be very grateful I you could
> help me.
>
> Kindest regards
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Dynamic-Routing-tp5068570p5070967.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to