Hi Austin

Thanks for the reply.  Well, the behaviour I observe is repeateable and
consistent, and provoked only by changing the class type from EventEntry to
CalendarEventEntry.
Just to be certain, though, I have pasted in your code and tried it.
Unfortunately, it didn't get as far as making an event - it crashes on my
trying to run it, with the following in the stack-trace as the proximate
cause:

**root cause**

java.lang.NumberFormatException: Invalid date/time format.
    com.google.gdata.data.DateTime.parseDateTime(Unknown Source)


with the line number corresponding to your line:

 DateTime startTime = DateTime.parseDateTime("2008-04-07");

 - it appears that this is not a valid way to generate DateTime objects!

This does surface an interesting related behaviour, though - it seems that
if the date string used to generate DateTime objects is generated from a
valid-but-untenable date-string (eg 2008-25-25T21:00:00-00:00, or
2008-04-25T21:00-00:00) the dateTime is generated and the event insert
apparently succeeds, but the inserted event is both invisible to a query and
does not appear in the google UI - ie the insert method fails silently in
producing a valid event.  The net effect of these is to produce something
similar to what I am seeing with the EventEntry/CalendarEventEntry
phenomenon, but I have checked and I am as far as I know using valid
date-time strings (eg of the form yyyy-MM-ddThh:mm:ss-hh:mm) .  This might
be worth your testing team taking a look at - definitely worth adding a
unit-test for, I think.

Anyway, I digress - I still have a problem.  In case it helps, I have pasted
in below the XML  for two events below - the first one is not visible in the
UI, the second is.  Any further ideas?

Cheers!

Jeremy


================== this event IS NOTvisible in the UI==================
http://www.google.com/calendar/feeds/ka74gsdrj7s22lb4ijuu5hgnv0%40group.calendar.google.com/private/full/qgo7j8qh6anda2o80981j3l7lg

<entry>

   <id>
http://www.google.com/calendar/feeds/ka74gsdrj7s22lb4ijuu5hgnv0%40group.calendar.google.com/private/full/qgo7j8qh6anda2o80981j3l7lg
</id>
<published>2008-04-07T02:11:10.000Z</published>
<updated>2008-04-07T02:11:10.000Z</updated>
<category 
scheme="http://schemas.google.com/g/2005#kind";<http://schemas.google.com/g/2005#kind>term=
"http://schemas.google.com/g/2005#event";<http://schemas.google.com/g/2005#event>/>

<title type="text">Executive Committee</title>
<content type="text"> </content>
<link rel="alternate" type="text/html" href=
"http://www.google.com/calendar/event?eid=cWdvN2o4cWg2YW5kYTJvODA5ODFqM2w3bGcga2E3NGdzZHJqN3MyMmxiNGlqdXU1aGdudjBAZw";<http://www.google.com/calendar/event?eid=cWdvN2o4cWg2YW5kYTJvODA5ODFqM2w3bGcga2E3NGdzZHJqN3MyMmxiNGlqdXU1aGdudjBAZw>title="alternate"/>
<link rel="self" type="application/atom+xml" href=
"http://www.google.com/calendar/feeds/ka74gsdrj7s22lb4ijuu5hgnv0%40group.calendar.google.com/private/full/qgo7j8qh6anda2o80981j3l7lg";<http://www.google.com/calendar/feeds/ka74gsdrj7s22lb4ijuu5hgnv0%40group.calendar.google.com/private/full/qgo7j8qh6anda2o80981j3l7lg>/>


   <author>
<name>SWRegional Calendar</name>
<email>[EMAIL PROTECTED]</email>
</author>

   <gd:comments>
<gd:feedLink href=
"http://www.google.com/calendar/feeds/ka74gsdrj7s22lb4ijuu5hgnv0%40group.calendar.google.com/private/full/qgo7j8qh6anda2o80981j3l7lg/comments";<http://www.google.com/calendar/feeds/ka74gsdrj7s22lb4ijuu5hgnv0%40group.calendar.google.com/private/full/qgo7j8qh6anda2o80981j3l7lg/comments>/>

</gd:comments>
<gd:eventStatus
value="http://schemas.google.com/g/2005#event.confirmed";<http://schemas.google.com/g/2005#event.confirmed>/>

<gd:visibility 
value="http://schemas.google.com/g/2005#event.default";<http://schemas.google.com/g/2005#event.default>/>

<gd:transparency
value="http://schemas.google.com/g/2005#event.opaque";<http://schemas.google.com/g/2005#event.opaque>/>

<gCal:uid value="[EMAIL PROTECTED]"<[EMAIL PROTECTED]>/>

<gCal:sequence value="0"/>
<gd:when startTime="2009-12-04T20:00:00.000Z"
endTime="2009-12-04T21:00:00.000Z"/>
<gd:who 
rel="http://schemas.google.com/g/2005#event.organizer";<http://schemas.google.com/g/2005#event.organizer>valueString=""
email=
"[EMAIL PROTECTED]"<[EMAIL PROTECTED]>/>

<gd:where valueString="Wellsprings Leisure, Taunton"/>
</entry>

=======================================================




==================this event IS visible in the UI ===============
http://www.google.com/calendar/feeds/[EMAIL 
PROTECTED]/private/full/49bp42ofupnu0l4glpsqvhjakk

<entry>

   <id>
http://www.google.com/calendar/feeds/swregionalcalendar%40googlemail.com/private/full/49bp42ofupnu0l4glpsqvhjakk
</id>
<published>2008-04-03T14:52:59.000Z</published>
<updated>2008-04-03T14:52:59.000Z</updated>
<category 
scheme="http://schemas.google.com/g/2005#kind";<http://schemas.google.com/g/2005#kind>term=
"http://schemas.google.com/g/2005#event";<http://schemas.google.com/g/2005#event>/>

<title type="text">adsfa</title>
<content type="text">fhn</content>
<link rel="alternate" type="text/html" href=
"http://www.google.com/calendar/event?eid=NDlicDQyb2Z1cG51MGw0Z2xwc3F2aGpha2sgc3dyZWdpb25hbGNhbGVuZGFyQGdvb2dsZW1haWwuY29t";<http://www.google.com/calendar/event?eid=NDlicDQyb2Z1cG51MGw0Z2xwc3F2aGpha2sgc3dyZWdpb25hbGNhbGVuZGFyQGdvb2dsZW1haWwuY29t>title="alternate"/>

   <link 
rel="http://schemas.google.com/gCal/2005/webContent";<http://schemas.google.com/gCal/2005/webContent>type="text/html"
href=
"http://www.paribus.org:81/cuw/OZ0607/IMAGE_313.jpg";<http://www.paribus.org:81/cuw/OZ0607/IMAGE_313.jpg>title="Event
Link">
<gCal:webContent url="dfghn"/>
</link>
<link rel="self" type="application/atom+xml" href=
"http://www.google.com/calendar/feeds/swregionalcalendar%40googlemail.com/private/full/49bp42ofupnu0l4glpsqvhjakk";<http://www.google.com/calendar/feeds/swregionalcalendar%40googlemail.com/private/full/49bp42ofupnu0l4glpsqvhjakk>/>


   <author>
<name>SWRegional Calendar</name>
<email>[EMAIL PROTECTED]</email>
</author>

   <gd:comments>
<gd:feedLink href=
"http://www.google.com/calendar/feeds/swregionalcalendar%40googlemail.com/private/full/49bp42ofupnu0l4glpsqvhjakk/comments";<http://www.google.com/calendar/feeds/swregionalcalendar%40googlemail.com/private/full/49bp42ofupnu0l4glpsqvhjakk/comments>/>

</gd:comments>
<gd:eventStatus
value="http://schemas.google.com/g/2005#event.confirmed";<http://schemas.google.com/g/2005#event.confirmed>/>

<gd:visibility 
value="http://schemas.google.com/g/2005#event.default";<http://schemas.google.com/g/2005#event.default>/>

<gd:transparency
value="http://schemas.google.com/g/2005#event.opaque";<http://schemas.google.com/g/2005#event.opaque>/>

<gCal:uid value="[EMAIL PROTECTED]"<[EMAIL PROTECTED]>/>

<gCal:sequence value="0"/>
<gd:when startTime="2008-04-08T02:00:00.000+01:00"
endTime="2008-04-08T03:00:00.000+01:00"/>
<gd:who 
rel="http://schemas.google.com/g/2005#event.organizer";<http://schemas.google.com/g/2005#event.organizer>valueString="SWRegional
Calendar" email=
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]>/>
<gd:where valueString="gyj"/>
</entry>

========================================================


On Mon, Apr 7, 2008 at 7:30 AM, Austin (Google) <[EMAIL PROTECTED]>
wrote:

>
> Hi,
>
> I haven't seen that problem you have described before.  Here is the
> code snippet that I used to create a calendar gadget using the Java
> client library -
>
> public void createWebContent() throws Exception {
>  URL feedUrl = new
> URL("http://www.google.com/calendar/feeds/default/private/full";);
>
>  CalendarEventEntry entry = new CalendarEventEntry();
>
>  entry.setTitle(new PlainTextConstruct(create web content"));
>
>  DateTime startTime = DateTime.parseDateTime("2008-04-07");
>  DateTime endTime = DateTime.parseDateTime("2008-04-07");
>
>  When eventTimes = new When();
>  eventTimes.setStartTime(startTime);
>  eventTimes.setEndTime(endTime);
>  entry.addTime(eventTimes);
>
>  WebContent wc = new WebContent();
>
>  wc.setTitle("title");
>  wc.setType("text/html");
>  wc.setIcon("http://www.google.com/intl/en_ALL/images/logo.gif";);
>  wc.setUrl("http://www.google.com";);
>  wc.setWidth("800");
>  wc.setHeight("600");
>
>  entry.setWebContent(wc);
>
>  // Send the request and receive the response:
>
>  printEntryXML(entry);
>
>  calendarService.insert(feedUrl, entry);
>  System.out.println("Event is created");
> }
>
> And I am able to view this through the UI as well as the API
>
> Hope it helps,
> Austin
>
> On Sun, Apr 6, 2008 at 12:49 PM, jeremy <[EMAIL PROTECTED]>
> wrote:
> >
> >  Hi
> >
> >  Having something of a problem seeing events in the google UI when they
> >  are created using the API.  I'm using the Java api to generate events
> >  and save them.  The events get created successfully, and can be
> >  successfully recalled using the api and listed, edited etc.  However,
> >  these events are NOT visible in the google UI - ie when I go to the
> >  google calendar web-interface, they are unlisted.
> >
> >   One wrinkle is that f I add a webContent object with an icon to the
> >  event, then the icon and time becomes visible in the google UI.  This
> >  applies when I use the code suggested in the help-docs at
> >  http://code.google.com/apis/calendar/developers_guide_java.html, ie
> >  creating a CalendarEventEntry and using a CalendarService connected to
> >  the calendar's /private/full URL to save it.
> >
> >  I have tried altering the event's visibility property to public, but
> >  without useful effect.
> >
> >  HOWEVER, if I change the event type class to EventEntry, then the
> >  saved items are fully visible in the google UI. Obviously I'm unable
> >  to try adding a webContent object, as EventEntry doens;t support
> >  these.
> >
> >  This isn;t a solution for me, as I need to use one or other of the
> >  extended properties to save the external ID of the created event to
> >  allow synchronization of the calendar.  My only other option is to
> >  maintain an externa store of event IDs and regularly attemt to
> >  synchronize, but as has already been pointed out by several coders
> >  this is a very brittle solution and highly unsatisfactory.
> >
> >  Any idea why CalendarEventEntries should be invisible in the google
> >  UI?  Anyone else seen this?
> >
> >  Jeremy
> >
> >  >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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