Thanks, Danny

Yes, this is pretty much what I am after, except is there also a way to pass 
parameters to my query?

E.g., if I did
curl http://localhost:9876/hello.xqy?param1=value1&param2=value2

Could I access the values of param's in my xQuery code?

Thanks,
Alexei Betin


-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of 
[email protected]
Sent: Monday, December 15, 2014 5:46 PM
To: [email protected]
Subject: General Digest, Vol 126, Issue 34

Send General mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://developer.marklogic.com/mailman/listinfo/general
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of General digest..."


Today's Topics:

   1. ways to execute xQuery against MarkLogic (Alexei Betin)
   2. Re: ways to execute xQuery against MarkLogic (Danny Sokolsky)


----------------------------------------------------------------------

Message: 1
Date: Tue, 16 Dec 2014 01:37:07 +0000
From: Alexei Betin <[email protected]>
Subject: [MarkLogic Dev General] ways to execute xQuery against
        MarkLogic
To: "[email protected]"
        <[email protected]>
Message-ID:
        <[email protected]>
Content-Type: text/plain; charset="us-ascii"

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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20141216/0f5078ce/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2470 bytes
Desc: image001.gif
Url : 
http://developer.marklogic.com/pipermail/general/attachments/20141216/0f5078ce/attachment-0002.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1623 bytes
Desc: image002.gif
Url : 
http://developer.marklogic.com/pipermail/general/attachments/20141216/0f5078ce/attachment-0003.gif
 

------------------------------

Message: 2
Date: Tue, 16 Dec 2014 01:46:15 +0000
From: Danny Sokolsky <[email protected]>
Subject: Re: [MarkLogic Dev General] ways to execute xQuery against
        MarkLogic
To: MarkLogic Developer Discussion <[email protected]>
Message-ID:
        <d4f697174c071d46b891b38bfc6eafa626a...@exchg10-be01.marklogic.com>
Content-Type: text/plain; charset="us-ascii"

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: [email protected] 
[mailto:[email protected]] On Behalf Of Alexei Betin
Sent: Monday, December 15, 2014 5:37 PM
To: [email protected]
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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://developer.marklogic.com/pipermail/general/attachments/20141216/fd7bcee5/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 2470 bytes
Desc: image001.gif
Url : 
http://developer.marklogic.com/pipermail/general/attachments/20141216/fd7bcee5/attachment.gif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1623 bytes
Desc: image002.gif
Url : 
http://developer.marklogic.com/pipermail/general/attachments/20141216/fd7bcee5/attachment-0001.gif
 

------------------------------

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general


End of General Digest, Vol 126, Issue 34
****************************************
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to