Page 1 of 1

Cannot save extended attributes when creating a document

Posted: Mon Apr 01, 2013 5:11 pm
by josiah.wilkerson
I'm creating a document and trying to save some extended attributes along with it. However, the response from the create doesn't include my attributes, neither do I see them when looking at the document via the web console. I get no errors when calling document create, and everything else seems to be working properly.

Code: Select all

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:doc="http://document.webservice.logicaldoc.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <doc:create>
         <!--Optional:-->
         <sid>5db5c1b7-585b-4812-a4e0-da9fdd8705c2</sid>
         <!--Optional:-->
         <document>
            <!--Zero or more repetitions:-->
            <extendedAttributes>
               <!--Optional:-->
               <!--<dateValue>?</dateValue>-->
               <!--Optional:-->
               <!--<doubleValue>?</doubleValue>-->
               <!--<editor>?</editor>-->
               <!--Optional:-->
               <!--<intValue>?</intValue>-->
               <!--Optional:-->
               <!--<label>mimeTypeLabel</label>-->
               <mandatory>1</mandatory>
               <!--Optional:-->
               <name>attrTestName</name>
               <position>0</position>
               <!--Optional:-->
               <stringValue>attr test value</stringValue>
               <type>0</type>
               <!--Optional:-->
               <!--<value>application/pdf</value>-->
            </extendedAttributes>
            <!--Optional:-->
            <fileName>testDoc.pdf</fileName>            
            <!--Optional:-->
            <folderId>4</folderId>
            <title>attrtitle</title>
         </document>
         <!--Optional:-->
         <content>cid:508376524071</content>
      </doc:create>
   </soapenv:Body>
</soapenv:Envelope>

Re: Cannot save extended attributes when creating a document

Posted: Wed Apr 03, 2013 8:00 am
by mmeschieri
To have all the properties compiled from WebServices you need to call the method getDocument

Re: Cannot save extended attributes when creating a document

Posted: Wed Apr 03, 2013 4:58 pm
by josiah.wilkerson
I was able to accomplish this by first defining a template in the admin console with the attributes I'm interested in. Then, I had to include the template ID in the document create operation. Is there a way to set extended attributes without using a template?

Re: Cannot save extended attributes when creating a document

Posted: Tue Apr 30, 2013 2:31 pm
by mmeschieri
No no way, when using extended attributes you have to refer to a valid template.