[
https://issues.apache.org/jira/browse/CAMEL-7040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-7040.
--------------------------------
Resolution: Not A Problem
Assignee: Claus Ibsen
Already possible today. If you header has a key with dots, use single quotes
around it
> Support calling OGNL expressions on headers accessed using
> in.headers[header.name] expression?
> ----------------------------------------------------------------------------------------------
>
> Key: CAMEL-7040
> URL: https://issues.apache.org/jira/browse/CAMEL-7040
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.12.2
> Reporter: Andrew
> Assignee: Claus Ibsen
> Priority: Minor
> Labels: Simple
>
> After spending a while trying to figure out how to get Camel to call an OGNL
> expression on a bean in the Exchange headers with the Simple Language, I
> discovered that I had gone about it completely the wrong way.
> What I have is a header, "soap.headers.blah", which is an object. I wanted to
> access a property, prop, on that header.
> Initially I tried ${in.headers.soap.headers.blah.prop}, which didn't work.
> I then spent quite a bit of time trying variations on
> ${in.headers[soap.headers.blah].prop}, none of which worked. Now, the
> documentation never said that what I was trying to do would work, so I only
> have myself to blame for that, but I think it would be quite nice if the
> second form *did* work, so that in addition to having the following:
> {{code}}
> header.foo.OGNL
> in.header.foo.OGNL
> in.headers.foo.OGNL
> {{code}}
> I could also do
> {{code}}
> header[foo.bar].OGNL
> in.header[foo.bar].OGNL
> in.headers[foo.bar].OGNL
> {{code}}
> I don't know what this involves - I suspect it's not terribly straightforward
> - but it would be nice to have an option for accessing properties on headers
> whose names include periods.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)