Problem with update Google Calendar Entry in Android
I'm using for update Calendar Entry lib:google-api-java-client v1.5
and this example from API:
http://code.google.com/intl/en/apis/calendar/data/2.0/developers_guide_protocol.html#UpdatingCalendars
I have good results for Creating and Deleting Calendar Entry,
but I don't can to Update Calendar Entry.
Help me.
This is my request:

-------------- HEADER  --------------
POST 
https://www.google.com/calendar/feeds/default/allcalendars/full/og8ik.....@group.calendar.google.com
Accept-Encoding: gzip
Authorization: GoogleLogin
auth=DQAAANoAAADy_...C4wV2nlfqudlb7jPuoIOCwA
GData-Version: 2
If-Match: W/"CUEHRX47eCp7JGA9WhdVEE4."
User-Agent: Google-HTTP-Java-Client/1.5.0-beta-SNAPSHOT (gzip)
Content-Type: application/atom+xml
Content-Length: 1696

-------------- BODY  --------------
<?xml version='1.0' encoding='UTF-8' ?>
<entry  gd:etag='W/"CUEHRX47eCp7JGA9WhdVEE4."'
    xmlns="http://www.w3.org/2005/Atom";
    xmlns:gCal="http://schemas.google.com/gCal/2005";
    xmlns:gd="http://schemas.google.com/g/2005";>
<published>2011-09-15T17:27:14.059Z</published>
<updated>2011-09-14T20:53:54.000Z</updated>
<summary type="text">Sample Calendar</summary>
<title type="text">New_Calendar</title>
<id>http://www.google.com/calendar/feeds/default/calendars/og8ik....
%40group.calendar.google.com</id>
<link href="https://www.google.com/calendar/feeds/og8ik....
%40group.calendar.google.com/private/full"
rel="alternate"type="application/atom+xml" />
<link href="https://www.google.com/calendar/feeds/og8ik....
%40group.calendar.google.com/private/full" rel="http://
schemas.google.com/gCal/2005#eventFeed" type="application/atom+xml" /
>
<link href="https://www.google.com/calendar/feeds/og8ik....
%40group.calendar.google.com/acl/full" rel="http://schemas.google.com/
acl/2007#accessControlList" type="application/atom+xml" />
<link href="https://www.google.com/calendar/feeds/default/allcalendars/
full/og8ik....%40group.calendar.google.com" rel="self"
type="application/atom+xml" />
<link href="https://www.google.com/calendar/feeds/default/allcalendars/
full/og8ik....%40group.calendar.google.com" rel="edit"
type="application/atom+xml" />
<gCal:accesslevel value="owner" />
<gCal:color value="#004688" />
<gCal:hidden value="false" />
<gCal:selected value="true" />
<gCal:timezone value="Europe/Moscow" />
<gd:where valueString="Moscow" />
</entry>
All data in this request was loaded from Calendar and was modified
only Color property.
------------------------------------------------
For this request I received this answer:
-------------- RESPONSE --------------
HTTP/1.1 400 Bad Request
Cache-Control: private, max-age=0
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Thu, 15 Sep 2011 17:27:31 GMT
Expires: Thu, 15 Sep 2011 17:27:31 GMT
Server: GSE
Set-Cookie: DO_NOT_CACHE_RESPONSE=true;Expires=Thu, 15-Sep-2011
17:27:32 GMT
Transfer-Encoding: chunked
Update-Client-Auth:
DQAAANoAAADy_...u42oC54M8PCZ4ilWcIigFPEW9qzoPQcy2UlD8qerC4r9Lw
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
------------------------------------------------
This request created by code in CalendarClient.java:
------------------------------------------------
public static void executeEdit(CalendarEntry entry) throws
IOException
{
 AtomContent content = AtomContent.forEntry(DICTIONARY, entry);
 HttpRequest request = requestFactory.buildPostRequest(new
CalendarUrl(entry.getEditLink()), content);
 GoogleHeaders headers = (GoogleHeaders) request.getHeaders();
 headers.setIfMatch(entry.etag);
 request.setHeaders(headers);
 request.execute().ignore();
}

------------------------------------------------
Where my error?
I can't found in Internet working example for updating Calendar entry
by google-api-java-client.

-- 
You received this message because you are subscribed to the Google
Groups "Google Calendar Data API" group.
To post to this group, send email to
google-calendar-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to
google-calendar-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at
http://code.google.com/apis/calendar/community/forum.html

Reply via email to