AnsweredAssumed Answered

Create cmis:document with CMIS

Question asked by barbidure on Oct 8, 2013
Latest reply on Oct 9, 2013 by barbidure
Hello,

I would like to create a document in Alfresco with CMIS protocol.

For this, I use the following XML file :

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org" >

   <author><name>admin</name></author>

   <summary>Presentation.</summary>

   <title>monDocument.pdf</title>

   <cmisra:object>

      <cmis:properties>

         <cmis:propertyId propertyDefinitionId="cmis:objectTypeId"><cmis:value>cmis:document</cmis:value></cmis:propertyId>

      </cmis:properties>

   </cmisra:object>

</entry>


That, I send to Alfresco with curl command :
curl -X POST -uadmin:test "http://localhost:8080/alfresco/s/cmis/p/Sites/epnum/documentLibrary/Folder/children" -H "Content-Type:application/atom+xml" -d @createContent.xml


The document is created in Alfresco.

But when I try to create other properties, such as:

<entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org" >

   <author><name>admin</name></author>

   <summary>Presentation.</summary>

   <title>monDocument.pdf</title>

   <cmisra:object>

      <cmis:properties>

         <cmis:propertyId propertyDefinitionId="cmis:objectTypeId"><cmis:value>cmis:document</cmis:value></cmis:propertyId>

         <cmis:propertyInteger propertyDefinitionId="cmis:contentStreamLength" displayName="Content Stream Length" queryName="cmis:contentStreamLength"><cmis:value>98495335</cmis:value></cmis:propertyInteger>

         <cmis:propertyString propertyDefinitionId="cm:title" displayName="Titre" queryName="cm:title"><cmis:value>Mon titre</cmis:value></cmis:propertyString>

      </cmis:properties>

   </cmisra:object>

</entry>



The properties cm:title and cm:contentSteamLength are not taken into account when creating.
The same problem arises with the aspects.

Have you an idea of the problem? Or a problem?

BR

Outcomes