gswhite
unread,Feb 21, 2012, 10:25:37 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 getting back a 501 (Not implemented) error from a Chandler server when trying to create a calendar collection, and for the life of me I can't figure out why. I've copied code directly from the appropriate CalDAV4J test class. Can anyone spot anything I've done wrong here? Or point me towards a way to figure out what is causing the 501?
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(true);
HostConfiguration hostConfig = new HostConfiguration();
hostConfig.setHost("192.168.200.145", 8080, "http"); //Tried tweaking these settings to make sure they're right. They are.
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(); //Always get back a status code of 501