Cannot save extended attributes when creating a document

Do you want to create a native client or integrate with third party applications: webservices are the solution.

Moderator: car031

josiah.wilkerson
Posts: 2
Joined: Mon Apr 01, 2013 4:48 pm

Cannot save extended attributes when creating a document

Mon Apr 01, 2013 5:11 pm

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>
mmeschieri
Posts: 242
Joined: Mon Apr 19, 2010 3:40 pm

Re: Cannot save extended attributes when creating a document

Wed Apr 03, 2013 8:00 am

To have all the properties compiled from WebServices you need to call the method getDocument
josiah.wilkerson
Posts: 2
Joined: Mon Apr 01, 2013 4:48 pm

Re: Cannot save extended attributes when creating a document

Wed Apr 03, 2013 4:58 pm

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?
mmeschieri
Posts: 242
Joined: Mon Apr 19, 2010 3:40 pm

Re: Cannot save extended attributes when creating a document

Tue Apr 30, 2013 2:31 pm

No no way, when using extended attributes you have to refer to a valid template.

Return to “Web Services”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest