gswhite
unread,Feb 21, 2012, 11:05:06 AM2/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cald...@googlegroups.com
I'm trying to create a calendar collection on a Chandler server. I've used code from the Chandler wiki as well as code from the CalDAV4j example class MkCalendarTest. I keep getting a 501 (Not Implemented) error. Any idea what I'm doing wrong? Thanks - Greg
MkCalendarMethod mk = new MkCalendarMethod();
mk.setPath("/dav/waschedule/collection");
mk.addDisplayName("My display Name");
mk.addDescription("this is my default calendar", "en");
HttpClient http = new HttpClient();
Credentials credentials = new UsernamePasswordCredentials("root", "(redacted)");
http.getState().setCredentials(new AuthScope("192.168.200.145", 8080), credentials);
http.getParams().setAuthenticationPreemptive(false);
HostConfiguration hostConfig = new HostConfiguration();
hostConfig.setHost("192.168.200.145", 8080, "http");
try {
http.executeMethod(hostConfig, mk);
} catch (HttpException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
int statusCode = mk.getStatusCode();