Hi all I'm new to Slide and thus to this mailing list. I'm using the WebDAV client and trying to create a directory and save a file in it. This works (except for character set problems), but when I want to delete them, I'm having problems. The file can be deleted without error, but as soon as I try to delete the directory, I get a HTTP response 301, and the deleteMethod() returns false.
I'm testing with the 'official' WebDAV test server at http://test.webdav.org/dav/ Any help would be greatly appreciated! :-) Here's my source: /** * The root folder for WebDAV */ private static final String TEST_WEBDAV_ROOT = "/dav/"; /** * A test WebDAV server open for client tests. */ private static final String TEST_WEBDAV_HTTP_URL = "http://test.webdav.org" + TEST_WEBDAV_ROOT; /** * The directory that's written to the test WebDAV server */ private static final String TEST_WEBDAV_DIRECTORY_TO_WRITE = "mmmyyy_test_directory"; /** * The file that's written to the test WebDAV server */ private static final String TEST_WEBDAV_FILE_TO_WRITE = "this_is_my_test_file.txt"; (Create directory and file) String newDirectory = TEST_WEBDAV_ROOT + TEST_WEBDAV_DIRECTORY_TO_WRITE; String newFile = newDirectory + "/" + TEST_WEBDAV_FILE_TO_WRITE; WebdavResource webDavResource = new WebdavResource(TEST_WEBDAV_HTTP_URL); boolean fileDeleted = webDavResource.deleteMethod(newFile); if (! fileDeleted) { log.error("Couldn't delete file " + newFile + ": " + webDavResource.getStatusCode() + ", " + webDavResource.getStatusMessage()); } boolean directoryDeleted = webDavResource.deleteMethod(newDirectory); if (! directoryDeleted) { log.error("Couldn't delete directory " + newDirectory + ": " + webDavResource.getStatusCode() + ", " + webDavResource.getStatusMessage()); } webDavResource.close(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
