Dirk,

Thanks a lot for your reply. I went with Slide's
version of HttpClient and advanced further until I got
to the point where I would like to ask for help again.

During my interaction with a remote WebDAV server
it sends 401 request for Digest Access Authentication (MD5)
and my client, I assume, automatically tries to perform
authentication but failed with a message:

"HTTP Exception: No credentials given, Status Code: -2"

Setting up credentials for HttpClient makes no sense
since the server expects MD5 authentication. The first
question I have is if there is way to turn off auto-authentication
feature of HttpClient and the second if client side API
of Slide provides means to carry out MD5 validation.
If no - no big deal, I can do it manually yet to do this
I need to read headers of a response from the server
and though it seems like very common task, I cannot
find anything in client API to make it happen.

Thank you for your time.

Best of luck,
Yuriy Zubarev





----- Original Message -----
From: "Dirk Verbeeck" <[EMAIL PROTECTED]>
To: "Slide Users List" <[EMAIL PROTECTED]>
Sent: Sunday, February 03, 2002 2:43 PM
Subject: Re: Just started


> Slide uses HttpClient version 1.x.
> Actually it was devellopped over here and moved over to commons 7 months
> ago. During this move the API was changed and isn't usable anymore with
> slide.
> Use the version in Slide CVS to have a compatible version.
>
> You can use the HttpClient directly to execute a method:
> HttpClient client=new HttpClient();
> client.startSession("localhost",8080,new Credentials("dirk","dirk"));
> client.setDebug(10);
> MkcolMethod mc=new MkcolMethod();
> mc.setPath("/slide/files/newpath");
> client.executeMethod(mc);
> client.endSession();
>
> Or use the WebdavResource interface:
> HttpURL httpUrl      = new HttpURL("http://localhost:8080/slide";);
> httpUrl.setUserInfo("root","root");
> WebdavResource webDR = new WebdavResource(httpUrl);
> System.out.println(webDR.getStatusMessage());
>
> Both the HttpClient and WebdavResource have a setDebug method to dump
> the request/response to screen.
>
> If you only want to test a server use the slide cmd-line client.
> It also has a "set debug on" command.
>
>
> Dirk
>
> Yuriy Zubarev wrote:
> >
> > Hello everyone,
> >
> > I'm a complete rookie in this WebDAV realm and basically
> > I'm interested in development of client side for querying WebDAV
> > resource. First I downloaded HTTPClient from Jakarta Commons
> > and decided to try it in conjunction with PropFindMethod object from
> > client API of Slide. After managing in this way I got
> > java.lang.NoSuchFieldError
> > exception and got an expression that Slide maintained its own
> > version HTTPClient, is it true in any way? What I was trying to achieve
> > was to create test program that connects to a site, sends 'propfind'
request
> > with XML schema and dumps on the screen server's response
> > (what's the best way to get it done?). Then I thought that
> > WebdavResource object was what I need but playing around
> > with it I didn't get far. So I would like to ask people
> > if there is some 'hello world' examples out there for client-side
> > application to talk with WebDAV resources.
> >
> > Thank you for your time.
> >
> > Best of luck,
> > Yuriy Zubarev
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to