Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.4.0, 4.4.1, 4.4.2, 4.5.0
-
None
-
Unknown
Description
This is a regression starting from 4.4.0
Reproducer:
https://github.com/DenisIstomin/camel-xquery-ns-bug
Does not work:
Namespaces ns = new Namespaces("soap", "http://schemas.xmlsoap.org/soap/envelope/"); String strExpression = "exists(/soap:Envelope/soap:Header)"; expression().xquery().expression(strExpression).resultType(String.class).namespaces(ns).end();
Throws exception:
net.sf.saxon.trans.XPathException: Namespace prefix 'soap' has not been declared
Workaround is to use XQueryBuilder:
XQueryBuilder xqueryBuilder = xquery(strExpression).resultType(String.class);
xqueryBuilder.setNamespaces(ns.getNamespaces());
Attachments
Issue Links
- links to