Can you try:
.setHeader("abc", XPathBuilder.xpath("/c:msg@event", 
String.class).namespace(ns))

Regards,
Ngoc Hai

--- On Fri, 2/25/11, bigbear <strutsus...@gmail.com> wrote:

> From: bigbear <strutsus...@gmail.com>
> Subject: xpath and header
> To: users@camel.apache.org
> Date: Friday, February 25, 2011, 11:27 PM
> Hi,
> 
> I am trying to set the result of an xpath expression
> evaluation in the
> header and it is failing:
> 
> 
> from("jms:topic:someTopic")
>          
>    .setHeader("abc", xpath("/c:msg@event",
> String.class, ns))
> 
> 
> Getting this error:
> 
> The method xpath(String) in the type BuilderSupport is not
> applicable for
> the arguments (String, Class<String>, Namespaces).
> 
> It looks like the 'xpath' in the router is different than
> the 'xpath' in
> setHeader.
> 
> Any ideas.
> 
> Thanks!
> 



Reply via email to