exchange.in returns an Object, so there is no getHeader method available on that.
There is an exchange.header but like I said it seems to return some DSL construct that I can't figure out how to get the value out of. On 1 November 2012 09:52, Willem jiang <willem.ji...@gmail.com> wrote: > > in.getHeader("header-name") should work for you. > > -- > Willem Jiang > > Red Hat, Inc. > FuseSource is now part of Red Hat > Web: http://www.fusesource.com | http://www.redhat.com > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) > (English) > http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) > Twitter: willemjiang > Weibo: willemjiang > > > > > > On Thursday, November 1, 2012 at 5:48 PM, Willem jiang wrote: > >> If you can access the exchange directly, you can use exchange.in >> (http://exchange.in)("header-key") to access the in message header. >> >> >> -- >> Willem Jiang >> >> Red Hat, Inc. >> FuseSource is now part of Red Hat >> Web: http://www.fusesource.com | http://www.redhat.com >> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) >> (English) >> http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese) >> Twitter: willemjiang >> Weibo: willemjiang >> >> >> >> >> >> On Thursday, November 1, 2012 at 5:34 PM, Sam (Stephen Samuel) wrote: >> >> > Hi all, >> > >> > How can I get the value of a header from an exchange using the Scala >> > DSL. Maybe I'm going mad but >> > >> > in.header("header-name") >> > >> > gives me a variable of type HeaderExpression or HeaderLanguage (can't >> > remember which) and I can't seem to get the "value" from that ? >> > > > -- -Sam