I found the error . The issue comes from the fact that I try to setHeader
with xpath("") without adding Namespaces object.
So when I use the following code
.setHeader("CompanyName").xpath("//SwInt:Requestor/text()", ns)
everything is ok
Thxs for your help.
:clap:
James.Strachan wrote:
>
> 2008/7/8 James Strachan <[EMAIL PROTECTED]>:
>> What happens if you uncommend the Namespaces line? FWIW you have to
>> define namespace prefixes to use XPath effectively with namespaced XML
>
> You need to actually use the Namespaces object to create your xpath
> expression.
>
> when(ns.xpath("..."))
>
> or
>
> when.xpath("...", ns)
>
> etc
>
> otherwise the namespace prefixes associated with the Namespaces object
> will not be passed into the xpath expression (hence your error)
>
> See the namespaces section...
> http://activemq.apache.org/camel/xpath.html
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
>
--
View this message in context:
http://www.nabble.com/Xpath-Prefix-NameSpace-Error-%21-tp18338783s22882p18339987.html
Sent from the Camel - Users mailing list archive at Nabble.com.