camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From heinrichheine <>
Subject setHeader using xpath returns Object?
Date Tue, 23 Aug 2011 09:43:35 GMT

i'm building my first route using the java DSL and i'm running in a small
trouble setting a header field.

I had a spring route looking and working like this:

<camel:setHeader headerName="incomingDate">

I want to build exactly the same in the java dsl:

 .xpath("//incoming:Value[1]/@date", String.class, ns)

The problem is, that xpath returns an Object, so i cannot continue
configuring my route from this point.
I want to put a choice as next step in the route, but thats not working
because xpath returns an Object.
And also i get a compiler warning due to type safety.
Does anyone have an idea for this?

Thanks in advance


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message