On 15/03/2008, Jar Lyons <[EMAIL PROTECTED]> wrote:
>
> James,
>
> I got the latest from the trunk and got juel working just fine. Thank
> You!!!
>
> My last hurdle is how to route based on JMS message properties .... It
> doesn't look like the properties are available in juel .... so I tried going
> after a property using the 'simple' syntax, but no joy ...
>
> <filter>
>
> <simple>${in.header.JMSType.startsWith('RTLS.draymanLocate')}</simple>
> <to uri=.......>
> </filter>
>
> Are the properties easily available via any of the standard expression
> languages? And if so, what exactly is the syntax?
Yes - you should be able to look up headers by name. I've just added a
few more test cases to JuelLanguageTest to show some real examples.
So you should be able to do
${in.headers.JMSType == 'foo'}
or use the string lookup for non-identifier based property names
${in.headers.['Content-Type'] == 'application/xml'}
etc
If you hit some issues with an expression language - such as JUEL -
you could hack the JuelLanguageTest to try things out to check your
expression is valid etc.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com