Problem Creating Calendar Collection

10 views
Skip to first unread message

gswhite

unread,
Feb 21, 2012, 11:05:06 AM2/21/12
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();

jzafrilla

unread,
Mar 14, 2012, 7:33:25 AM3/14/12
to caldav4j
Your server does not support calendar creation i supposed. Check your
server configuration or source code and find implementation for
createCalendar() method.
Hope this helps.
Reply all
Reply to author
Forward
0 new messages