On Wed, Dec 7, 2011 at 11:26 PM, Christian Müller <[email protected]> wrote: > Hello Peter! > > I'm not sure, but may "//*/data/text()" doesn't return a String? It may > return a kind of TextImpl (org.w3c.dom.Text) which isn't serializable and > reason Camel drop it? Could you log the class of the header values? >
Yes it will most likely return some internal DOM structure type. So by using resultType="String" you tell Camel to convert that DOM structure type to a plain String, which is an accepted type by JMS spec and thus included. You can use the Tracer to see what is going on http://camel.apache.org/tracer > Best, > Christian > > On Tue, Dec 6, 2011 at 7:45 AM, rspeter <[email protected]> wrote: > >> Hi Claus, >> >> As I said earlier, I am using only header now. >> But I have issues tracking the header again. >> >> I used xpath to store value in a headerName='"test". I can see this header >> is visible only when I explicitly set its result type to string, otherwise >> the headername is not visible. >> >> Visible header: >> <setHeader headerName="test"><xpath >> resultType="java.lang.String">//*/data/text()</xpath></setHeader> >> >> NOT-Visible header: >> <setHeader headerName="test"><xpath>//*/data/text()</xpath></setHeader> >> >> Thanks >> Peter >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Camel-message-How-long-custom-headers-and-properties-live-tp5047495p5051169.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
