You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Cristiano Costantini <cr...@gmail.com> on 2013/06/06 20:24:30 UTC

Header and java.util.Date

Hi All,

I want to set the value of an header to a java.util.Date with current value.

How can I do in XML DSL?

<setHeader headerName="messageTime">
<...whichLanguage?>which Value?</...whichLanguage?>
</setHeader>

My preference is for languages in camel-core if possible...

Thanks!!
Cristiano

Re: Header and java.util.Date

Posted by Claus Ibsen <cl...@gmail.com>.
The simple language has a date function but its only for formatting to
a String value
http://camel.apache.org/simple

If you want code like new Date() then you would need to use some of
the other languages like groovy, javascript, possible mvel, or ognl
can do it.
http://camel.apache.org/languages



On Thu, Jun 6, 2013 at 8:24 PM, Cristiano Costantini
<cr...@gmail.com> wrote:
> Hi All,
>
> I want to set the value of an header to a java.util.Date with current value.
>
> How can I do in XML DSL?
>
> <setHeader headerName="messageTime">
> <...whichLanguage?>which Value?</...whichLanguage?>
> </setHeader>
>
> My preference is for languages in camel-core if possible...
>
> Thanks!!
> Cristiano



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen