405 is method not allowed. Two common errors when creating WebDAV
resources are 405 (method not allowed) and 409 (conflict). The causes
are either that you try to create a resource that already exists or
you try to create a resource but its parent does not exist yet. If you
only have /default/files/default.preview and try to do an
WebdavService.mkcol for /default/files/default.preview/content/foo/bar
you get an error because it goes only 1 level deep. There is a
WebdavService.mkcols that will create the content/foo/bar for you
because it creates the whole structure.

Jasha

2009/6/22 Jeroen Hoffman <[email protected]>:
> Hi,
> I'm creating a small servlet that should store xml in the repository.
> First it will try to create a collection using executMkCol, but that
> fails with a 405 http response.
>
> My code is:
>        DocumentPath path =
> repoWebdavService.getBasePath().createRelativePath("/test");
>        int httpResponseCode;
>        // if head successful then no need to perform mkcol
>        try {
>                httpResponseCode = repoWebdavService.executeHead(path);
>        }
>        catch (DocumentNotFoundException de) {
>                httpResponseCode = repoWebdavService.executeMkCol(path);
>        }
>
> In log I get (besides a head INFO message):
> ERROR nl.hippo.client.webdav - Server response is not valid, HTTP
> response code is 405 (MKCOL: /files/default.preview/appdata/test)
>
> I've set up the webdav service to point to /files/default.preview/appdata.
> I'm using a root user with which I can create collections using WebDav
> navigator from Eclipse.
>
> Is this a configuration issue? Any suggestions?
>
>
> Thanks
> Jeoren Hoffman
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
>
> Searchable archives can be found at:
> MarkMail: http://hippocms-dev.markmail.org
> Nabble: http://www.nabble.com/Hippo-CMS-f26633.html
>
>
********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Searchable archives can be found at:
MarkMail: http://hippocms-dev.markmail.org
Nabble: http://www.nabble.com/Hippo-CMS-f26633.html

Reply via email to