Its a real minor nit, but the example doesn't actually use any of the
namespace prefixes you define in the Namespaces object :)

You might wanna change the example to this...

    when().xpath("//tns:GetPerson", ns).to("jbi:service:blah").


2008/6/18 tmi <[EMAIL PROTECTED]>:
>
> Also in case your incoming XML message uses namespaces you need to handle
> them in your xpath expression inside your Camel route.
>
> E.g. consider the following example:
>
> public void configure() {
>  Namespaces ns = new Namespaces("tns",
> "http://servicemix.apache.org/samples/wsdl-first/types";);
>  ns.add("soapenv", "http://schemas.xmlsoap.org/soap/envelope/";);
>
>  from("jbi:endpoint:http://test.org/company/camel/Myendpoint";).
>  choice().
>    when().xpath("//GetPerson", ns).to("jbi:service:blah").
>    otherwise().to("jbi:service:blah2").
>  end();
> }
> --
> View this message in context: 
> http://www.nabble.com/Problem-regarding-XPath-in-camel-tp17866139p17985845.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to