cancel
Showing results for 
Search instead for 
Did you mean: 

Get Folders only under /Site

generic1
Champ in-the-making
Champ in-the-making
Hi,

I get all folders over CMIS with:


SELECT * FROM cmis:folder c


Now I only will get folders under /Sites folder (and no sub folders of Folders under /Site). Is this possible and how?

Thanks a lot!
Generic1
6 REPLIES 6

afaust
Legendary Innovator
Legendary Innovator
Hello,

this is possible by using the IN_FOLDER selector in the WHERE clause of your query. "SELECT * FROM st:sites" will give you the /Sites directory and you can use the cmisSmiley SurprisedbjectId to fill the IN_FOLDER selector.
But if you are only interested in sites (the only folders under /Sites), the you can also just do a "SELECT * FROM st:site" to get all the sites (which should always only be contained in /Sites).

Regards
Axel

generic1
Champ in-the-making
Champ in-the-making
perfect! Thanks a lot!!

generic1
Champ in-the-making
Champ in-the-making
I would have another question on this issue.
If i execute

SELECT s.cmis:lastModificationDate, s.cmis:name, s.cmis:objectTypeId, s.cmis:createdBy, s.cmis:objectId, s.cmis:baseTypeId, s.cmis:description FROM st:site s


over CMIS workbench, I get all properties of the sites including "description".

If I set up the same request over SOAPUI:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200908/">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-666" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>admin</wsse:Username>
            <wsse:Password>pw</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <ns:query>
         <ns:repositoryId>12346be3-7faa-4c83-8eb0-432199012d30</ns:repositoryId>
         <ns:statement>SELECT s.cmis:description, s.cmis:lastModificationDate, s.cmis:name, s.cmis:objectTypeId, s.cmis:createdBy, s.cmis:objectId, s.cmis:baseTypeId FROM st:site s</ns:statement>
      </ns:query>
   </soapenv:Body>
</soapenv:Envelope>


than description is empty.
Does anyone know why?

Thanks a lot!!
Generic

afaust
Legendary Innovator
Legendary Innovator
Hello,

first of all, which URL are you using for the SOAP request? Alfresco 4.x has several URLs and depending on the specific URL you are using, there may be differences in the implementation that relate to this.

Also, speaking from personal preference: SOAP? Ugh… There is nothing better than the browser binding. I purposely "forgot" there are any other bindings at all.

Regards
Axel

generic1
Champ in-the-making
Champ in-the-making
Hi,

thanks a lot for the response! I use the URL

https://HOST/alfresco/cmisws/DiscoveryService


and I hade prefered using SOAP because my Alfresco Client can only handle XML and no JSON (otherwise I would change to REST).
Is there any other URL to invoke CMIS 1.1 instead of CMIS 1.0 over SOAP?

Thanks a lot,
Generic1

afaust
Legendary Innovator
Legendary Innovator
Hello,

unfortunately, it seems the SOAP endpoint is missing from the new Public API which should be used in 4.2 and above. See <a href="https://issues.alfresco.com/jira/browse/ACE-2468">ACE-2468</a>. The pattern of CMIS URLs to be used is outlined in that issue.

Regards
Axel