[cosmo-dev] Data importation into the Derby database from text
files
Christine Lu
christine.lu at ensi-bourges.fr
Fri Feb 1 05:45:40 PST 2008
Hi Randy,
When I try the command below :
curl -u user:pass -H 'Content-Type: text/calendar' -T
path/to/icalendarfile.ics
http://localhost:8080/chandler/mc/collection/123-abcd-123-abcd/icalendarfile.ics
I get an error :
"The server refused this request because the request entity is in a format
not supported by the requested resource for the requested method"
Maybe it's not possible to add directly a file.ics into an existing
collection stored on the server.
Do you have an idea?
Thanks for your help!
Christine
> If you want to use caldav, the first thing you need to do is transform
> the data in the text files into the icalendar format (see
> http://rfc.net/rfc2445.html). This means converting the data to VEVENTs
> if you want to create events, or VJOURNAL if you want to create notes.
> If you are using java, then you can use the ical4j library
> (http://ical4j.sourceforge.net/), or you can construct the icalendar
> yourself. Once you convert the data from the text files into icalendar
> format, you can use caldav to add them to a collection. One way to do
> this would be to use the caldav4j
> library(http://caldav4j.googlecode.com). You can find examples of how
> to add data in the test cases for caldav4j (for example
> http://caldav4j.googlecode.com/svn/trunk/src/test/java/org/osaf/caldav4j/BaseTestCase.java).
> The path to the collection can be found in the webui under the
> collection details, and it should look something like:
>
> http://localhost:8080/chandler/dav/collection/1234-abcd-1234-abcd
>
> Another option would be to use a command line tool like curl. After
> parsing the data into icalendar files (one file per item) you can add
> them to a collection with a command like:
>
> curl -u user:pass -H 'Content-Type: text/calendar' -T
> path/to/icalendarfile.ics
> http://localhost:8080/chandler/dav/collection/123-abcd-123-abcd/icalendarfile.ics
>
> You would issue one command per item.
>
> -Randy
More information about the cosmo-dev
mailing list