cancel
Showing results for 
Search instead for 
Did you mean: 

Get no result from query() in DiscoveryService

rexmao
Champ in-the-making
Champ in-the-making
Hi,

I'm trying the query() method in DiscoveryService. I used the code as below:

discoveryS = ServiceFactory.getDiscoveryService();

DiscoveryService.cmisObjectListType objectList = discoveryS.query(repositoryId, "select * from cmis:folder", true, false, wsstudy.DiscoveryService.enumIncludeRelationships.both, "*", "0", "0", new wsstudy.DiscoveryService.cmisExtensionType());
          
DiscoveryService.cmisObjectType[] objects = objectList.objects;

I got no result return which did supprise me. The value of objectList.objects is null. Does anybody know about this method? Did I write a wrong query statement?

BTW, all the cmis WS method need a cmisExtensionType param. Does anybody know about its usage?

And, is there any docmentum for the API description?

Thanks in advance,

Rex
2 REPLIES 2

rameshbelli
Champ in-the-making
Champ in-the-making
Hi ,

Try with 

DiscoveryService.enumIncludeRelationships.none

and also change value for MaxItems from "0" to "" or some  > 0


Hope this helps.

Ramesh

rexmao
Champ in-the-making
Champ in-the-making
Hi Ramesh

I really thanks your idea. I got the results return. I didn't set the right value of maxitems. I thought "0" is for return all which should be "";

Thank you.

Rex