You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by gludington <gl...@gmail.com> on 2017/08/25 18:23:10 UTC

non-strings in properties/headers

Is it possible to store/retrieve non string values in properties or headers
using XML?  Perhaps the simplest example illustrating what I would like to
do is:

<setProperty propertyName="date"><javaScript>new
java.util.Date()</javaScript></setProperty>

But when I retrieve this, it is a String.  I do not need to user javaScript
specifically, but is there a syntax in XML to set a non-String property (or
header)?

Thanks,
Greg




--
View this message in context: http://camel.465427.n5.nabble.com/non-strings-in-properties-headers-tp5812254.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: non-strings in properties/headers

Posted by Claus Ibsen <cl...@gmail.com>.
If you use JMS then headers must be valid according to the JMS spec,
which do not allows POJO classes etc. You can find that in the JMS
spec or details in camel-jms documentation

On Fri, Aug 25, 2017 at 8:59 PM, gludington <gl...@gmail.com> wrote:
> It appears date was merely a conflicting name choice; when I use a different
> name, e.g. mydate, it comes through fine (though serialized over my mq
> broker as a Long, not a Date, but thats a different issue).  Also, putting
> in Maps and similar come through fine as well.
>
> Thanks,
> Greg
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/non-strings-in-properties-headers-tp5812254p5812255.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: non-strings in properties/headers

Posted by gludington <gl...@gmail.com>.
It appears date was merely a conflicting name choice; when I use a different
name, e.g. mydate, it comes through fine (though serialized over my mq
broker as a Long, not a Date, but thats a different issue).  Also, putting
in Maps and similar come through fine as well.

Thanks,
Greg



--
View this message in context: http://camel.465427.n5.nabble.com/non-strings-in-properties-headers-tp5812254p5812255.html
Sent from the Camel - Users mailing list archive at Nabble.com.