xquery function - send namespace as binding variable and define it in a tag
ganeshJun 15 2011 — edited Jun 16 2011Hi,
I have an xquery function that creates a soap fault and returns. For the xquery function I am sending a namespace (as string). This namespace should be defined in one of tag.
Inside the xquery I want
declare function xf:createFault($serviceNamespace as xs:string)
as element(*) {
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Fault xmlns:pre="{$serviceNamespace }"> ------> this gives compile error
<faultcode>pre:svcFault</faultcode>
<faultstring>Service Fault</faultstring>
<detail>
..............
This is required as the receiving system needs to know the namespace definition, so that it can understand the faultcode...
Any help on this pls.
Pls let me know if can explain it better?
Thanks
Ganesh