You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Patel, Himanshu Z." <HZ...@seic.com> on 2015/03/24 19:50:26 UTC

DOTCMIS 0.6 using AtomPub Binding 1.1

Hi:

I am using DOTCMIS library to create document in Alfresco 5.0, when I try to create document using AtomPub Binding 1.1 I am getting different types of error which are follow...


1)      When I try to create Folder object using following

tagetFolder = (Folder)session.GetObjectByPath("<path>");



Property 'cm:description' doesn't exist!



I tried to debug this in the source code provided and found that when we use 1.1 binding , the property is replaced by "cmis:description". Found more few such properties which either is not supported using 1.1 binding or its name got changed...



2)      After overcoming the issue in point 1, now I found some strange issue related to Content Model that is define which is using Aspects. When I create document by setting the value for "cmis:objectTypeId" as name of the content model type  (which uses Aspects) and setting all the property values for Aspects , than i am getting the exception which say that


               Property '<name of aspect property>' is not valid for this type!



I have verified weather Aspect is part of my Document which I have created by following


Document doc = tagetFolder.CreateDocument(properties, contentStream, null) as Document;

var allaspects= doc.GetPropertyValue("cmis:secondaryObjectTypeIds");

.. //check if my aspect is part of allaspects

// if so add the values for all the properties of aspect and update the document properties...


          Dictionary<string, object> parameters2 = new Dictionary<string, object>();

            parameters2.Add("<aspect property1", "value for aspect");
            parameters2.Add("<aspect property2", "value for aspect");

     doc.UpdateProperties(parameters2);



Please advise.

Thanks,
Himanshu.

Re: DOTCMIS 0.6 using AtomPub Binding 1.1

Posted by Florian Müller <fm...@apache.org>.
Hi Himanshu,

DotCMIS only supports CMIS 1.0. If you are connecting to a CMIS 1.1 URL, 
you may encounter a few issues.
Secondary types (aspects) don't exist in CMIS 1.0 and therefore DotCMIS 
does not handle them.
You can set and get aspects with DotCMIS via extensions. Please refer to 
the Alfresco documentation.


- Florian



> Hi:
> 
> I am using DOTCMIS library to create document in Alfresco 5.0, when I
> try to create document using AtomPub Binding 1.1 I am getting
> different types of error which are follow...
> 
> 
> 1)      When I try to create Folder object using following
> 
> tagetFolder = (Folder)session.GetObjectByPath("<path>");
> 
> 
> 
> Property 'cm:description' doesn't exist!
> 
> 
> 
> I tried to debug this in the source code provided and found that when
> we use 1.1 binding , the property is replaced by "cmis:description".
> Found more few such properties which either is not supported using 1.1
> binding or its name got changed...
> 
> 
> 
> 2)      After overcoming the issue in point 1, now I found some
> strange issue related to Content Model that is define which is using
> Aspects. When I create document by setting the value for
> "cmis:objectTypeId" as name of the content model type  (which uses
> Aspects) and setting all the property values for Aspects , than i am
> getting the exception which say that
> 
> 
>                Property '<name of aspect property>' is not valid for 
> this type!
> 
> 
> 
> I have verified weather Aspect is part of my Document which I have
> created by following
> 
> 
> Document doc = tagetFolder.CreateDocument(properties, contentStream,
> null) as Document;
> 
> var allaspects= doc.GetPropertyValue("cmis:secondaryObjectTypeIds");
> 
> .. //check if my aspect is part of allaspects
> 
> // if so add the values for all the properties of aspect and update
> the document properties...
> 
> 
>           Dictionary<string, object> parameters2 = new
> Dictionary<string, object>();
> 
>             parameters2.Add("<aspect property1", "value for aspect");
>             parameters2.Add("<aspect property2", "value for aspect");
> 
>      doc.UpdateProperties(parameters2);
> 
> 
> 
> Please advise.
> 
> Thanks,
> Himanshu.