Hi

A <constant> in the XML DSL will be a String type.

If you are using Camel 2.8 you can use the simple language where you
can specify a result type
http://camel.apache.org/simple

 <setHeader headerName="MyTimeStamp">
        <simple resultType="Long">1234567893214411</simple>
 </setHeader>

You can omit the java.lang when referring to the Java built-in types
from java.lang.
But you can also do resultType="java.lang.Long"



On Wed, Nov 23, 2011 at 5:48 PM, tnk <jus...@gmail.com> wrote:
> Hello,
>
>  I am setting jms message headers inspring dsl like this:
>
> <setHeader headerName="MyTimeStamp">
>        <constant>1234567893214411</constant>
> </setHeader>
>
> and sending message to IBM Websphere MQ.
>
> Is it possible to define the value type (for example long)? In my case it is
> stored in ibm mq message RFH2 like:
>
> <MyTimeStamp>1234567893214411</MyTimeStamp>
>
> It causes problems other applications to read messages using selectors and
> comparing values (MyTimeStamp > xxx). According to IBM documentation, the
> type (for example long) can be defined and the header should look like:
>
> <MyTimeStamp dt='i8'>123</MyTimeStamp>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/setting-jms-headers-and-defining-daa-types-tp5017259p5017259.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to