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.