Hi Alexei, The most common way to evaluate xquery modules is to create an HTTP App Server, put the code as xqy files under the app server root, and then hit the URL with a browser or with a tool like curl. For example, suppose you have an HTTP App Server you have set up with a root of /space/appserver, listening on port 9876.
Now create a file called /space/appserver/hello.xqy with the following content: "hello" Now with curl or with a browser, go to http://localhost:9876/hello.xqy It will prompt you to authenticate, and after that you will get the response of the string "hello" back. Is that what you were asking? -Danny From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of Alexei Betin Sent: Monday, December 15, 2014 5:37 PM To: general@developer.marklogic.com Subject: [MarkLogic Dev General] ways to execute xQuery against MarkLogic Hello, I've been experimenting with xQuery syntax using MarkLogic Query console and I've been quite happy with the results so far, but now I'd like to make sure I understand all the options for using xQuery against MarkLogic in an client application: >From documentation, one sure way to execute xQueries would be using XCC API >(Java or .Net) against XDBC interface, but I am a bit confused about whether >there're any other / language-independent options, e.g.: Is it possible to execute xQuery directly using REST API? If not, is it possible by storing .xqy on MarkLogic and wrapping it into a REST API extension and then having the client call the extension? Is it possible to wrap xQuery into a MarkLogic (RESTful) web-service and then have client access the web-service then instead of passing xQuery directly? If so, would it be different from creating a REST API extension? Is there a command-line xQuery client tool? Any advice along with pointers to documentation/examples for the possible options is most welcome! Thanks, [Forward Slash] [Elevate] Alexei Betin Principal Architect; Big Data P: (817) 928-1643 | Elevate.com<http://www.elevate.com> 4150 International Plaza, Suite 300 Fort Worth, TX 76109 Privileged and Confidential. This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain privileged and/or confidential information. If you have received this e-mail in error, please notify me immediately by a return e-mail and delete this e-mail. You are hereby notified that any dissemination, distribution or copying of this e-mail and/or any attachments thereto, is strictly prohibited.
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general