Hello
In Camel route I want set header from following XML body

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<erp:CompanyStatusResponse xmlns:erp="http://e-arvetekeskus.eu/erp";>
<erp:CompanyActive regNumber="11306297">
NO
</erp:CompanyActive>
</erp:CompanyStatusResponse>
</SOAP-ENV:Body></SOAP-ENV:Envelope>


I want catch string "NO" from message body
In manual ..No namespace given
 "from message.in.header if there is a header with the given key"

so I set header

<setHeader headerName="erp">
    <constant>http://e-arvetekeskus.eu/erp</constant>
</setHeader>
<setHeader headerName="eArveYES">
    <xpath>/erp:CompanyStatusResponse/erp:CompanyActive</xpath>
</setHeader>    

but I got error
Invalid xpath: /erp:CompanyStatusResponse/erp:CompanyActive. Reason:
javax.xml.xpath.XPathExpressionException

How must correct syntax for xpath expression look like ?

Kuido

--
View this message in context: 
http://camel.465427.n5.nabble.com/Spring-DSL-XPATH-namespace-query-syntax-with-header-in-key-tp5715171.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to