It looks like you're trying to overwrite a collection with a file. That
should fail.
-James
On Fri, 2004-11-19 at 18:14 -0600, Chris O'Connell wrote:
> I'm trying to do some basic stuff to just get my hands around slide and
> writing a client. I have Slide running on my tomcat 4.1 server. I was able
> to use the packaged command line Slide client to create a node as user root
> (/slide/files/test). I then used the client to put a file (test.txt) into
> that new node. I can use my browser to go to the node and I see my file.
>
> So, I tried to use the WebdavResource class to do something similar. I use
> the following code, and I get a failure message. My Tomcal log tells me:
>
> http2112-Processor1, 19-Nov-2004 18:04:13, root, PUT, 405 "Method Not
> Allowed", 0 ms, /files/test/
>
> I don't get it. Why can I use the command line app to put a file, but not
> the WebdavResource? Thanks for any help you can provide.
>
> Chris
>
> <<snip...
> HttpURL myMachineUrl = new
> HttpURL("http://localhost:2112/slide/files/test/");
> myMachineUrl.setUserinfo("root", "root");
> UsernamePasswordCredentials cred = new
> UsernamePasswordCredentials();
> cred.setUserName("root");
> cred.setPassword("root");
> WebdavResource davResource = new
> WebdavResource(myMachineUrl);
> davResource.setCredentials(cred);
>
> if (davResource == null){
> throw new Exception("davResource is null.
> can't continue");
>
> }
>
> Enumeration enum = davResource.getAllowedMethods();
>
> WebdavResources resources =
> davResource.getChildResources();
>
> Enumeration capabilities =
> davResource.getDavCapabilities();
>
> File testFile = new File("C:\\odbcconf.log");
>
> boolean success = davResource.putMethod(testFile);
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]