Can't update an document entry using V2 or V3 protocol

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't update an document entry using V2 or V3 protocol

zabojad
Hi,

I'm trying to update the content of a file on GD. I first tried with the V3 protocol  http://code.google.com/intl/fr-FR/apis/documents/docs/3.0/developers_guide_protocol.html#UpdatingContentResumable

Here are the requests/responses between my application and GD :



First request from my app:

PUT https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0B2yy6vmVuxB8Y[etc...]HTTP/1.1
Host: docs.google.com
Connection: close
User-Agent: MyCompany-MyApp-1.0 Zend_Framework_Gdata/1.10.6
GData-Version: 3
authorization: GoogleLogin auth=[blablabla]
Accept-encoding: identity
If-Match: *
Content-Length: 0
Content-Type: text/plain
X-Upload-Content-Length: 17
X-Upload-Content-Type: text/plain



First response from GD :

HTTP/1.1 200 OK
Server: Upload Server Built on May 13 2011 14:17:29 (1305321449)
Location: https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0B2yy6vmVuxB8Y[etc...]
Date: Mon, 23 May 2011 14:14:35 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 0
Content-Type: text/html
Connection: close



Second request from my app:

PUT https://docs.google.com/feeds/upload/create-session/default/private/full/file%3A0B2yy6vmVuxB8Y[etc...] HTTP/1.1
Host: docs.google.com
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Zend-ZendFramework Zend_Framework_Gdata/1.10.6
Content-Length: 17

ecriture reussie



Second request from GD :

HTTP/1.1 400 Bad Request
Server: Upload Server Built on May 13 2011 14:17:29 (1305321449)
Content-Type: application/vnd.google.gdata.error+xml
Date: Mon, 23 May 2011 14:14:36 GMT
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 241
Connection: close

<errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>InvalidEntryException</code><internalReason>Sorry, myfile.xml cannot be uploaded to replace the selected document.</internalReason></error></errors>



I also tried the V2 protocol and get an "Invalid request" response :(.

Has anyone succeeded in updating a file on GD ?

Thanks

Tom
Reply | Threaded
Open this post in threaded view
|

Re: Can't update an document entry using V2 or V3 protocol

Francisco
This post has NOT been accepted by the mailing list yet.
Hello,

I have the same issue, are you solve it?

If I find the solution, I'll post it in this forum.

Bye