ZOHO-API: viewDocument returns document list and not the doc
Hello,
we wanted to use the call to "viewDocument to read the content of a specific document. To make the call we use this XML source:
<?xml version="1.0" encoding="UTF-8" ?>
<methodCall xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" noNamespaceSchemaLocation="http://writer.zoho.com/schema/document.xsd">
<methodName>writer.viewDocument</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>documentname</name>
<value>
<string>testdocument</string>
</value>
</member>
<member>
<name>documentid</name>
<value>
<long>73432000000003003</long>
</value>
</member>
<member>
<name>version</name>
<value>
<double>1.0</double>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
When the call returns there we find the document list in the resulting XML just like we get it from a call to "getDocuments" and not the single document we wanted to read!
Our workflow:
- authenticate and get the login ticket
- read the document list with "getDocuments"
- read one of the documents from the list with "viewDocument"
We have to read the list first to get the document_id values for all saved documents! I have tried to call "viewDocument" directly with a known document_id but that gives me the document list as result too.
I have checked if we are really sending the correct XML for "view Document" using the MS Fiddler application that lets you look into the outgoing HTTP request.
Can you please tell me what is wrong with the XML above?
Thanks in advance,
Ralf