I would like to create more than one name, something like this: Namespaces env = new Namespaces("soapenv", "http://schemas.xmlsoap.org/soap/envelope/"); Namespaces wsa = new Namespaces("wsa", "http://www.w3.org/2005/08/addressing"); Namespaces ax = new Namespaces("axis2", "http://ws.apache.org/namespaces/axis2");
and would like to use it on the xpath expression in route, something like this: .loadBalance().sticky(xpath("/soapenv:Envelope/soapenv:Header/wsa:ReplyTo/wsa:ReferenceParameters/axis2:ServiceGroupId/text()") , env, wsa, ax) But when I try to use it, I get an error as The method xpath(String) in the type BuilderSupport is not applicable for the arguments (String, Namespaces, Namespaces, Namespaces) What I am doing here is parsing the ServiceGroupID element from my SOAP header, which contians the session of the transcation and performing a sticky load balancing session based on the session. Is what I am doing right? If not are there any other ways to get this element from SOAP Header? I gave a look at CXF component but didn't understand any thing out of it. My SOAP Response message looks something like this: <?xml version="1.0" encoding="http://schemas.xmlsoap.org/soap/envelope/" standalone="no"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"> <wsa:ReplyTo> <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address> <wsa:ReferenceParameters> <axis2:ServiceGroupId xmlns:axis2="http://ws.apache.org/namespaces/axis2">urn:uuid:99A029EBBC70DBEB221347349722532</axis2:ServiceGroupId> </wsa:ReferenceParameters> </wsa:ReplyTo> <wsa:MessageID>urn:uuid:99A029EBBC70DBEB221347349722564</wsa:MessageID> <wsa:Action>some action to perform</wsa:Action> <wsa:RelatesTo>urn:uuid:63AD67826AA44DAE8C1347349721356</wsa:RelatesTo> </soapenv:Header> <soapenv:Body> something in the body </soapenv:Body> </soapenv:Envelope> I would be really glad if anyone could help me here. I am struck in this part for quite a while now. -- View this message in context: http://camel.465427.n5.nabble.com/Using-more-than-one-namespace-and-calling-it-in-Xpath-tp5719120.html Sent from the Camel - Users mailing list archive at Nabble.com.