You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by beat glattfelder <be...@glattfelder.com> on 2010/07/17 21:44:02 UTC

RouteBuilder issue

Why is it that the first form will work while the second will not? I'm using
camel 2.3.

                // reply path for web file systems
                from("processor-sellside:requestor:WEB,WEI")
                .setHeader("CamelFileName").simple("trade/xxx.x")
                .process(new TagValueLookup("{*.76:925365|*.9901:AKJ}"))
               
.recipientList(header(RoutingProcessor.REQUESTOR_SOURCE_URI));
       
                // reply path for web file systems
                from("processor-sellside:requestor:WEB,WEI")
                .process(new TagValueLookup("{*.76:925365|*.9901:AKJ}"))
                .setHeader("CamelFileName").simple("trade/xxx.x")
               
.recipientList(header(RoutingProcessor.REQUESTOR_SOURCE_URI));
        
-- 
View this message in context: http://camel.465427.n5.nabble.com/RouteBuilder-issue-tp1353922p1353922.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RouteBuilder issue

Posted by beat glattfelder <be...@glattfelder.com>.
Hi

the problem was with the missing static import, upgrading to 2.5 fixed it.

Quoting "Claus Ibsen-2 [via Camel]"  
<ml...@n5.nabble.com>:

>
>
>
> Hi
>
> What does not work? When reporting you must be more precise.
> I assume its the compiler, which can happen due Java and Generics is
> maxed out how you can use it to build DSL.
>
>
> The problem is most often setting expression using fluent builder style
>
> This
>>                .setHeader("CamelFileName").simple("trade/xxx.x")
>
> Should be changed to be a parameter instead
>                 .setHeader("CamelFileName", simple("trade/xxx.x"))
>
> And in Camel 2.3 you may have to static import simple from simple
> language. In Camel 2.4 its provided out of the box.
> And 2.4 has just been released so I encourage you to upgrade to it.
>
>
> On Sat, Jul 17, 2010 at 9:44 PM, beat glattfelder   
> <be...@glattfelder.com> wrote:
>>
>> Why is it that the first form will work while the second will not? I'm using
>> camel 2.3.
>>
>>                // reply path for web file systems
>>                from("processor-sellside:requestor:WEB,WEI")
>>                .setHeader("CamelFileName").simple("trade/xxx.x")
>>                .process(new TagValueLookup("{*.76:925365|*.9901:AKJ}"))
>>
>> .recipientList(header(RoutingProcessor.REQUESTOR_SOURCE_URI));
>>
>>                // reply path for web file systems
>>                from("processor-sellside:requestor:WEB,WEI")
>>                .process(new TagValueLookup("{*.76:925365|*.9901:AKJ}"))
>>                .setHeader("CamelFileName").simple("trade/xxx.x")
>>
>> .recipientList(header(RoutingProcessor.REQUESTOR_SOURCE_URI));
>>
>> --
>> View this message in context:   
>> http://camel.465427.n5.nabble.com/RouteBuilder-issue-tp1353922p1353922.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>
>
> ______________________________________
> View message @   
> http://camel.465427.n5.nabble.com/RouteBuilder-issue-tp1353922p1431206.html
>
> To unsubscribe from RouteBuilder issue, click   
>  (link removed) ==
>



-- 
View this message in context: http://camel.465427.n5.nabble.com/RouteBuilder-issue-tp1353922p1438780.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: RouteBuilder issue

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What does not work? When reporting you must be more precise.
I assume its the compiler, which can happen due Java and Generics is
maxed out how you can use it to build DSL.


The problem is most often setting expression using fluent builder style

This
>                .setHeader("CamelFileName").simple("trade/xxx.x")

Should be changed to be a parameter instead
                .setHeader("CamelFileName", simple("trade/xxx.x"))

And in Camel 2.3 you may have to static import simple from simple
language. In Camel 2.4 its provided out of the box.
And 2.4 has just been released so I encourage you to upgrade to it.


On Sat, Jul 17, 2010 at 9:44 PM, beat glattfelder <be...@glattfelder.com> wrote:
>
> Why is it that the first form will work while the second will not? I'm using
> camel 2.3.
>
>                // reply path for web file systems
>                from("processor-sellside:requestor:WEB,WEI")
>                .setHeader("CamelFileName").simple("trade/xxx.x")
>                .process(new TagValueLookup("{*.76:925365|*.9901:AKJ}"))
>
> .recipientList(header(RoutingProcessor.REQUESTOR_SOURCE_URI));
>
>                // reply path for web file systems
>                from("processor-sellside:requestor:WEB,WEI")
>                .process(new TagValueLookup("{*.76:925365|*.9901:AKJ}"))
>                .setHeader("CamelFileName").simple("trade/xxx.x")
>
> .recipientList(header(RoutingProcessor.REQUESTOR_SOURCE_URI));
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/RouteBuilder-issue-tp1353922p1353922.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus