I'm playing with iCal4j-connector, and it works ok. It won't find the calendar-home-set from the principals, but I was able to find the events stored in my CalendarServer installation with the following code :

import net.fortuna.ical4j.connector.ObjectNotFoundException;
import net.fortuna.ical4j.connector.ObjectStoreException;
import net.fortuna.ical4j.connector.dav.CalDavCalendarCollection;
import net.fortuna.ical4j.connector.dav.CalDavCalendarStore;
import net.fortuna.ical4j.model.Calendar;
import net.fortuna.ical4j.model.Property;

import org.apache.commons.httpclient.protocol.Protocol;
import org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory;

Protocol myHTTPS = new Protocol( "http", new DefaultProtocolSocketFactory(), 80 ); CalDavCalendarStore store = new CalDavCalendarStore("MacTI","localhost",8008,myHTTPS,"/calendars");
store.connect("admin","password".toCharArray());
// it only works when checking a calendar collections, the user collections won't work CalDavCalendarCollection collection = store.getCollection("/users/ admin/calendar/");
Calendar[] calendars = collection.getCalendars();
if (calendars != null) {
        for (int iter = 0; iter < calendars.length; iter++) {
                // Display the start time of the event
NSLog .out .appendln (calendars[iter].getComponent("VEVENT").getProperty(Property.DTSTART));
        }
}

So for reading events, it should works fine.

Hi Amedeo,

Take a look at [1]. We use it for our calendar component and it works pretty well.

[1]ical4j.sourceforge.net/

Cheers,

Henrique

Amedeo Mantica wrote:
Hello all,
Anyone know if there is a Library, a Class, a Framework to access CalDAV calendars ?
I need just to read data ad display on the web, no editing
Regards
Amedeo
://www.linkedin.com/in/macti


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to