Hi See this FAQ http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
On Tue, Jul 3, 2012 at 4:00 PM, Gordon_K <[email protected]> wrote: > I'm working in Camel 2.9.1 and I'm having an issue with complex expressions. > I have an FTP endpoint that is working just fine. Dumps the file right where > I need it to be (mostly). The only problem is that it puts it into a > directory that is named ${header.externalID}, obviously because it's not > evaluating the complex expression and getting the value from the header. > I've tried almost every way I can could think of, but I always get the same > result: > > > > to("ftp://{{placeholder}}/${header.externalID}"); > > to("ftp://{{placeholder}}/${in.header.externalID}"); > > to("ftp://{{placeholder}}/" + header("${header.externalID}") ); > > to("ftp://{{placeholder}}/" + header("externalID") ); > > to("ftp://{{placeholder}}/" + simple("${header.externalID}") ); > > to("ftp://{{placeholder}}/" + simple("${header.externalID}", String.class) > ); > > to("ftp://{{placeholder}}/" + simple("${header.externalID}").getText() ); > > > None of it works. I always end up getting the literal string. And in the > case of one of the simple cases, I even get a "Simple: " in the text. I've > checked and the externalID variable is definitely in the header. And just to > be 100% sure, I tried using a ${date:...} expression as well, and it didn't > evaluate that either. I asked my partner who's been working in Camel a bit > longer and he had no ideas either. > > Is there something that I'm missing? I'm also not opposed to workarounds. > There's a processor() right before the to() that puts the value in the > header. If I could insert something in between the processor() and to() that > would help me out with this, I would definitely do it. I just want some way > to use the Camel FTP component and not create an entirely separate bean to > do the FTP work. > > Thanks in advance. > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Simple-Not-Evaluating-Complex-Exression-tp5715408.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.com Author of Camel in Action: http://www.manning.com/ibsen
