Yes, that didn't help. In fact, based on the error and where
it was
being reported at, it never got passed the resource
creation. I guess I
have figured out the main cause: I had some other
commons-httpclient jar
in my classpath and I believe that was causing the issue.
Thanks
Ali.
aslam bari wrote:
> Have you tried to give credentials with request like
("root","root" or
"john","john") etc.
>
>
> ----- Original Message ----
> From: Ali Naddaf <ali naddaf.org>
> To: slide-user jakarta.apache.org
> Sent: Wednesday, 28 March, 2007 1:55:43 AM
> Subject: 400 bad request error
>
>
> Hello everyone.
> I just started using slide + slide-client and am
running into a basic
> issue that doesn't allow me go any further. I
downloaded slide server
> (binary, version 2.1) and dropped the war in my webapp
directory of
> tomcat (5.5.23). Then I was able to access the WebDAV
file system using
> my Windows explorer; I was be to drop a file there and
get a file. So
> that makes me think that the server side is working
fine.
>
> Then I downloaded the slide-webdav-client (2.1) and
tried to run the
> following code:
>
> ---------------------------------
> public static void main(String[] args) {
> try
> {
> HttpURL url = new HttpURL("http://local
host:8080/slide/files";);
> WebdavResource res = new
WebdavResource(url);
> File file = new
File("C:/temp.zip");
> res.putMethod(file);
> res.close();
> }
> catch(Exception e) {
> e.printStackTrace();
> }
> }
> -------------------------------
>
> but at the line that I am creating the webdav resource,
it fails and on
> the server log, I see the following error:
> http-8080-Processor25, 27-Mar-2007 14:14:26,
unauthenticated, PROPFIND,
> 400 "Bad Request", 0 ms, /files
>
> and in my java code, the following stack:
> --------------------------------
> org.apache.commons.httpclient.HttpException
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavRe
source.java:3467)
> at
>
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavRe
source.java:3423)
> at
>
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavReso
urce.java:967)
> at
>
org.apache.webdav.lib.WebdavResource.setBasicProperties(Webd
avResource.java:912)
> at
>
org.apache.webdav.lib.WebdavResource.setProperties(WebdavRes
ource.java:1894)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResour
ce.java:1301)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResour
ce.java:1320)
> at
>
org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResour
ce.java:1408)
> at
org.apache.webdav.lib.WebdavResource.<init>(WebdavReso
urce.java:290)
> at
com.dawnatech.cyclops.webdav.WebDAVTest.main(WebDAVTest.java
:16)
> ------------------------------------
>
> Could someone please tell me what I am missing?
>
> Many thanks,
> Ali.
>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: slide-user-unsubscribe jakarta.apache.org
> For additional commands, e-mail: slide-user-help jakarta.apache.org
>
>
>
>
__________________________________________________________
> Yahoo! India Answers: Share what you know. Learn
something new
> http://in.answers.yahoo.
com/
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribe jakarta.apache.org
For additional commands, e-mail: slide-user-help jakarta.apache.org
|