501 Not Implemented Error with Chandler server

13 views
Skip to first unread message

gswhite

unread,
Feb 21, 2012, 10:25:37 AM2/21/12
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

Roberto Polli

unread,
Feb 21, 2012, 11:30:04 AM2/21/12
to cald...@googlegroups.com
Il 21 febbraio 2012 16:25, gswhite <gregs...@gmail.com> ha scritto:
> I'm getting back a 501 (Not implemented) error from a Chandler server

Are you creating a collection into a collection?

Afaik a collection can contain:
- events XOR collections

If a collection contains events, can't contain one more collection.

Are you in that case?

Can you verify with OPTIONS or PROPFIND what operations your folder
supports?

Peace,
R.

gswhite

unread,
Feb 21, 2012, 11:54:34 AM2/21/12
to cald...@googlegroups.com
Thanks for the prompt response, Roberto.  It jarred a couple of thoughts loose and led me to the solution.  My path was set to

/dav/waschedule/collection/

...when it should have been set to

/chandler/dav/waschedule/collection/

Now I get back the expected 201.  Thanks!






Roberto Polli

unread,
Feb 21, 2012, 12:41:03 PM2/21/12
to cald...@googlegroups.com
Il 21 febbraio 2012 17:54, gswhite <gregs...@gmail.com> ha scritto:
> ...when it should have been set to
> /chandler/dav/waschedule/collection/
> Now I get back the expected 201.  Thanks!
;)

Peace,
R.

Reply all
Reply to author
Forward
0 new messages