Hi ,
I am currently trying to use mxquery for one of our projects here at Depth.ch ( company specialized in GIS web dev)
Using the war file provided by the default build mechanism (-f build.xml war), I added an xquery file (named xqueryEngineTemplate.xquery) to the list of filesin the root directory of the mxquery web application. (same where the default .xquery files are found)
The content of the file is:
module namespace lc="http://localhost/sdiv2";
declare function lc:testsoap($a as xs:integer) as xs:string{
let $input :=
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Hello">
<soapenv:Header/>
<soapenv:Body>
<doHello>
<doHello>Tom</doHello>
</doHello>
</soapenv:Body>
</soapenv:Envelope>
let $resultSOAP-Env := fn:soap-call(xs:anyURI("http://localhost/sdiv2/testwsdl/hello_server.php"),$input)
return $resultSOAP-Env//return/text()
};
However, just reaching the wsdl file related to my xquery file gives the following error. In my case the url is http://localhost:8080/MXQuery/services/xqueryEngineTemplate.wsdl?
XML Parsing Error: syntax error
Location: http://localhost:8080/MXQuery/services/xqueryEngineTemplate
Line Number 1, Column 1:Function named fn:soap-call not available
I am concerned that a separate build process might be required to expose the soap-call function.
The version I am using is 0.6 http://sourceforge.net/projects/mxquery/files/mxquery/mxquery-0.6.0/mxquery-src-0.6.0.zip/download
Could you point me to what could be the issue here, and if possible provide an example for a soap-call usage.
Thanks
Kiran
Dear Kiran,
I could reproduce the problem and can offer a workaround:
We currently offer just the four-parameter version of soap-call(). This has been an oversight when packaging. You find an example also at
http://mxquery.org/?page_id=166
On the long run, I'd recommend switching towards the EXPath HTTP client, since it is evolving as a semi-standard among XQuery engines. MXQuery 0.6 does have support for this, but the current SVN version does.
Best Regards,
Peter