If you want to automate testing of an HTTP request handler, I'd suggest testing it with an HTTP client. If instead you want to test the underlying functionality with an XCC client, you should probably factor that out into a library function or module that doesn't need access to HTTP request information.
Sam Neth Lead Engineer MarkLogic Corporation On Mar 18, 2011, at 12:08 AM, ambika arumugam wrote: Hi all, I have a xquery file which has xdmp:get-request-field to get one of its parameters when it is accessed via the HTTP server, the same xquery file is access by a xdbc server for testing so i am using declare variable $keyword as xs:string as external to retrieve the value of parameter from the xdbc connection to pass on to the xquery. I would like this xquery file to handle both the request depending on the requirement. Using the xcc connection in the java environment I am using Request requestURL = session.newModuleInvoke("datefile.xqy" ); requestURL.setNewStringVariable("node-string", "filename"); ResultSequence sequence = session.submitRequest(requestURL); and in the xquery I am using declare variable $node-string as xs:string as external; and then using the variable $node-string I want to make the xquery in such a way that it accepts and handles both the requests without any issues Regards Ambika _______________________________________________ General mailing list General@developer.marklogic.com<mailto:General@developer.marklogic.com> http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general