camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigbear <strutsus...@gmail.com>
Subject Re: xpath and header
Date Sat, 26 Feb 2011 14:18:09 GMT
Thanks for the response.

The XPathBuilder expects the content somewhere. I was not sure where I can
provide that in a Router.

Instead, I settled for this:
.setHeader("abc", ns.xpath("//@event", String.class))

Thanks!


On Fri, Feb 25, 2011 at 11:40 PM, Pham Ngoc Hai <pngochai@yahoo.com> wrote:

> Can you try:
> .setHeader("abc", XPathBuilder.xpath("/c:msg@event",
> String.class).namespace(ns))
>
> Regards,
> Ngoc Hai
>
> --- On Fri, 2/25/11, bigbear <strutsuser1@gmail.com> wrote:
>
> > From: bigbear <strutsuser1@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!
> >
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message