cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco CMIS 1.1 compliant?

mangar
Star Contributor
Star Contributor
I am getting some pushback at work for using the alfresco-opencmis-extension to get aspects to work, specifically "cm:titled"

My question is "Is Alfresco CMIS 1.1 compliant or not?" 

I am using 4.2.d community, and OpenCMIS 0.10.  Both the Alfresco documentation and the Apache site say they are 1.1 compliant, so why do I have to use the alfresco-opencmis-extension?  How long will I have to use it before a standard 1.1 client (like apache chemistry) will work?

14 REPLIES 14

jpotts
World-Class Innovator
World-Class Innovator
Can you verify which service URL you are using?

Jeff

mundi
Champ in-the-making
Champ in-the-making
I'm using the parameter (test server):
<blockcode>
parameters.put(SessionParameter.ATOMPUB_URL, "http://alfresco03.pch.etat.lu:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom");
</blockcode>

jpotts
World-Class Innovator
World-Class Innovator
Make sure you are NOT using the AlfrescoObjectFactoryImpl for your Object Factory Class. That should only be used when you are using the OpenCMIS Extension. Because you are using 1.1 you do not need that extension and it will prevent the aspect from being added.

I just ran this code on 4.2.f CE and it added the aspect successfully:


Session cmisSession = getCmisSession();
   
Folder folder = (Folder) cmisSession.getObjectByPath("/test");
         
HashMap<String, Object> props = new HashMap<String,Object>();

props.put("cmis:name", "testjtp.txt");
         
Document document = createDocument(folder, getLocalFile(), getLocalFileType());
         
List<Object> aspects = document.getPropertyValue("cmis:secondaryObjectTypeIds");

aspects.add("P:sc:productRelated");
         
props = new HashMap<String, Object>();
         
props.put("cmis:secondaryObjectTypeIds", aspects);
         
document.updateProperties(props, true);
         
aspects = document.getPropertyValue("cmis:secondaryObjectTypeIds");


Jeff

mundi
Champ in-the-making
Champ in-the-making
I used the AlfrescoObjectFactoryImpl so that was the problem…
Thank you very much!

s00pa
Champ in-the-making
Champ in-the-making
Hi, I know this thread is from a while back but I felt that this question was best asked here.

I am finding that using the CMIS 1.1 path when accessing via OpenCMIS, if I copy a document, it doesn't seem to be indexed..
Basically I have a custom object type which has custom properties. I can search using these properties normally but any document copied using CMIS 1.1 doesn't appear in the search results. Also, CMIS query on a property field shows nothing.
However, if I change to the CMIS 1.0 path and perform the copy, then this all works. Seems like a bug to me but would be interested to see if this is replicated for others or if there is a workaround. I really don't want to have to go back to CMIS 1.0 because I rather like the newer aspect support in 1.1 but this is a major game-changer.

using Apache OpenCMIS 0.12
Running alfresco 5.0.c
using the following paths:
1.0   :   alfresco/api/-default-/public/cmis/versions/1.0/atom
1.1   :   alfresco/api/-default-/public/cmis/versions/1.1/atom



Sean