You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sekaijin <je...@sap.aphp.fr> on 2013/07/03 18:13:37 UTC

file language : how to retrieve a header whose key contains DOT

Hi.
I have a header that contains the key '.' => "aphp.destination.site"
I am trying to locate a filename in a url but I can not get my header
I use camel 2.8.1

I found in the sample language syntax
${header[key]} I tried to ${header[breadcrumbId]} but it does not work
I get an error telling me that the syntax is valid
${header.name[breadcrumbId]} but it not work.


I saw that for a key with spaces must be use quotes
${header.name['key foo']} but it does not work
no more than ${header.name['breadcrumbId']}

Thank
BYE




--
View this message in context: http://camel.465427.n5.nabble.com/file-language-how-to-retrieve-a-header-whose-key-contains-DOT-tp5735162.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: file language : how to retrieve a header whose key contains DOT

Posted by Christian Müller <ch...@gmail.com>.
If you read the documentation carefully, you will see the syntax
${header[foo]} is available for Camel 2.9.2 onwards and not for Camel 2.8.1
(which is by the way not supported anymore at Apache - we support 2.10. and
2.11. at this time).

Any chance to upgrade?

[1] http://camel.apache.org/simple.html

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Wed, Jul 3, 2013 at 6:13 PM, sekaijin <je...@sap.aphp.fr>wrote:

> Hi.
> I have a header that contains the key '.' => "aphp.destination.site"
> I am trying to locate a filename in a url but I can not get my header
> I use camel 2.8.1
>
> I found in the sample language syntax
> ${header[key]} I tried to ${header[breadcrumbId]} but it does not work
> I get an error telling me that the syntax is valid
> ${header.name[breadcrumbId]} but it not work.
>
>
> I saw that for a key with spaces must be use quotes
> ${header.name['key foo']} but it does not work
> no more than ${header.name['breadcrumbId']}
>
> Thank
> BYE
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/file-language-how-to-retrieve-a-header-whose-key-contains-DOT-tp5735162.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>