1

I have an aspect with name "alfrescoDocs:uploadedfrom" and it has single property with name "alfrescoDocs:uploadSource". I am using alfresco-opencmis-extension to attached this aspect with document on creation and set some value in its property. I am using code below.

    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put(PropertyIds.NAME, "test12");
    properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document,P:cm:titled,P:alfrescoDocs:uploadedfrom");
    properties.put("cmis:description", "AliNawab");
    properties.put("alfrescoDocs:uploadSource", "SugarCRM");

    Document doc = session.getRootFolder().createDocument(properties, null, null);

This code successfully attaches the aspect with newly created document. But the value of property "alfrescoDocs:uploadSource" is not updating.

I am using: http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom url for connection.

Also I need to do exactly the same in php.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ali Nawab
  • 85
  • 1
  • 8
  • yes I have solved this issue following this forum : https://forums.alfresco.com/forum/developer-discussions/alfresco-api/setting-aspect-property-using-cmis-06122014-1046 – Ali Nawab Mar 18 '15 at 07:52

1 Answers1

0

It worked for me when I used http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom.

seems http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom has some changes around aspect props.

user327126
  • 965
  • 3
  • 11
  • 22