Hi Devesh,

Most likely this is a matter of permissions. Run 
xdmp:document-get-permissions('/sample/abc.xml') in Query Console and see what 
you get. If you have set up permissions on the document, then you'll get 
something like this:

<sec:permission xmlns:sec="http://marklogic.com/xdmp/security";>
<sec:capability>update</sec:capability>
<sec:role-id>1165898424934929953</sec:role-id>
</sec:permission>
<sec:permission xmlns:sec="http://marklogic.com/xdmp/security";>
<sec:capability>read</sec:capability>
<sec:role-id>1165898424934929953</sec:role-id>
</sec:permission>

If you get the empty sequence as a result, there are no permissions set on the 
document. The user with which you're running the extension needs to have a role 
that has read permissions on the document. For more information, see the 
Understanding and Using Security 
Guide<http://docs.marklogic.com/guide/security>.

Dave.

--
Dave Cassel
Developer Community Manager
MarkLogic Corporation<http://www.marklogic.com/>


From: <Tyagi>, Devesh <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Wednesday, November 12, 2014 at 10:31 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] Can't access data in a dependent library while 
executing a resource extension in Java API


Hi,


I have the following configuration of a Rest Instance,


root : /

port : 10001

modules : dev-rest-modules

database : dev-rest

The xqueries which I have installed using Java API's ResourceExtension service 
are stored in 'dev-rest-modules'. A document named with uri '/sample/abc.xml' 
is stored in 'dev-rest'. When I am trying to fn:doc('/sample/abc.xml') from a 
query in 'dev-rest-modules'  all I am getting is empty sequence. Is it 
impossible to access the contents of the database  from the xqueries in 
modules.?

Please help.


Thanks and regards,

Devesh Tyagi​


"This e-mail and any attachments transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential , proprietary or 
privileged information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. Any 
unauthorized review, use, disclosure, dissemination, forwarding, printing or 
copying of this e-mail or any action taken in reliance on this e-mail is 
strictly prohibited and may be unlawful."
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to