hi!
i'm prgramming in java and want to use the picasa and calendar
service. well it works quite good as far as the picasa app is
concerned... !
using this snipplet of code should give me the posibillity to acces
the service and create a calendar
before i do this code i do quite the same with the picasa api!
authenticating the user than adding the album, after that the
authentication (do i need this a second time? ) creating an calendar!
public void createCalendar(Location location) {
log.info("CalendarService create calendar");
this.authenticate();
// Create the calendar
CalendarEntry calendar = new CalendarEntry();
calendar.setTitle(new PlainTextConstruct(location.getName()));
calendar.setSummary(new
PlainTextConstruct(location.getDescription()));
calendar.setTimeZone(new TimeZoneProperty("Europe/Vienna"));
calendar.setHidden(HiddenProperty.FALSE);
calendar.setColor(new ColorProperty("#2952A3"));
calendar.addLocation(new Where("","","Graz"));
// Insert the calendar
try {
URL postUrl = new
URL("http://www.google.com/calendar/feeds/default/
owncalendars/full");
CalendarEntry returnedCalendar =
myService.insert(postUrl,
calendar);
facesMessages.add("Calendar sucessfuly created for
location");
} catch (Exception e) {
e.printStackTrace();
}
}
i think the code is fine but the service sometimes doesnt work and i
get this message! which is not the most helpful one
com.google.gdata.util.ResourceNotFoundException: Not Found
<HTML>
<HEAD>
<TITLE>Not Found</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Not Found</H1>
<H2>Error 404</H2>
</BODY>
</HTML>
09:33:23,157 ERROR [STDERR] at
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(Unknown
Source)
09:33:23,157 ERROR [STDERR] at
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(Unknown
Source)
09:33:23,157 ERROR [STDERR] at
com.google.gdata.client.http.HttpGDataRequest.checkResponse(Unknown
Source)
09:33:23,157 ERROR [STDERR] at
com.google.gdata.client.http.HttpGDataRequest.execute(Unknown Source)
09:33:23,157 ERROR [STDERR] at
com.google.gdata.client.http.GoogleGDataRequest.execute(Unknown
Source)
09:33:23,157 ERROR [STDERR] at
com.google.gdata.client.Service.insert(Unknown Source)
09:33:23,157 ERROR [STDERR] at
com.google.gdata.client.GoogleService.insert(Unknown Source)
09:33:23,157 ERROR [STDERR] at
com.stereoscope.session.google.Calendar.createCalendar(Calendar.java:
106)
please be so kind and give me a hint !
cheers
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---