Hi ..

i can update all recurrence event (like daily ,weekly,yearly) but i
can't update monthly recurrence events.
 how to update monthly recurring events in my application using google
calendar api in java..

i tried to update using following code in java

The code is :

     GoogleService myService = new GoogleService("cl","exampleCo-
exampleApp-1");
      myService.setUserCredentials([email protected],password);

      URL postURL = new URL("http://www.google.com/calendar/feeds/
[email protected]/private/full");

        Query myQuery = new Query(postURL);
        myQuery.setFullTextQuery(title);
        CalendarEventFeed myResultsFeed = myService.query
(myQuery,CalendarEventFeed.class);

        Iterator iterFeed = myResultsFeed.getEntries().iterator();
        CalendarEventEntry myEvent = (CalendarEventEntry) iterFeed.next
();

        myEvent.setTitle(new PlainTextConstruct(title));
        myEvent.setContent(new PlainTextConstruct(content));
        Person author = new Person("Texflow", null,userId);
        myEvent.getAuthors().add(author);
        myEvent.addLocation(new Where("","",location));

       String participants []={"[email protected]"};
        if(participants !=null && !(participants.equals("")) )
{
                EventWho []guest = new EventWho[participants.length];
                        for(int i=0;i<participants.length;i++) {
                                guest[i] = new EventWho();
                                guest[i].setEmail(participants[i]);
                                myEvent.addParticipant(guest[i]);

                        }
                myEvent.setSendEventNotifications(true);
                }
                //Create DateTime events and create a When object to
hold them, then
add
                //the When event to the event

        String recurData = "DTSTART;VALUE=DATE:20091001\r\n"
        + "DTEND;VALUE=DATE:20091002\r\n"
        + "RRULE:FREQ=MONTHLY;BYDAY=1Tu;UNTIL=20100904\r\n";

                        Recurrence recur = new Recurrence();
                        recur.setValue(recurData);
                        myEvent.setRecurrence(recur);
                        myEvent.update();

while using above code i'm getting following error ..


com.google.gdata.util.InvalidEntryException: Bad Request
[Line 3, Column 78, element entry] Duplicate extension element
http://schemas.google.com/g/2005:recurrence

        at
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
(HttpGDataRequest.java:502)
        at
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
(GoogleGDataRequest.java:555)
        at com.google.gdata.client.http.HttpGDataRequest.checkResponse
(HttpGDataRequest.java:480)
        at com.google.gdata.client.http.HttpGDataRequest.execute
(HttpGDataRequest.java:459)
        at com.google.gdata.client.http.GoogleGDataRequest.execute
(GoogleGDataRequest.java:527)
        at com.google.gdata.client.Service.update(Service.java:1422)
        at com.google.gdata.client.Service.update(Service.java:1377)
        at com.google.gdata.client.GoogleService.update
(GoogleService.java:544)
        at com.google.gdata.data.BaseEntry.update(BaseEntry.java:599)


can anyone help in this.
--~--~---------~--~----~------------~-------~--~----~
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 
[email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to