Hi,

I opened an invalid issue report about updating document content with
the Java library (http://code.google.com/p/gdata-issues/issues/detail?
id=1200) and I got an explanation about the version difference.
However I still don't understand how to do it. I didn't change the
protocol version, so I figure I'm using the default 2.0. When I tried
to do something like the following:

storedEntry.setMediaSource(new MediaByteArraySource(csvContent.getBytes
(), "text/csv"));
storedEntry.updateMedia(false);

I get the following exception:

java.lang.IllegalStateException:
com.google.gdata.util.ServiceForbiddenException: Forbidden
If-Match or If-None-Match header required

So i tried adding the following command before that:

docsService.getRequestFactory().setHeader("If-Match",
storedEntry.getEtag());

and then I got this exception:

com.google.gdata.util.PreconditionFailedException: Precondition Failed
Resource does not support Etags

So what is the correct way to do it? The documentation for the Java
client doesn't cover this at all.

Thanks,

Gabriel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to