I have the following code.  When I hit an open access webdav server, it succeeds in 
creating the test directory, but when it hits a server that requires a login, it 
fails.  Both servers are IIS-5, and I can access them both via m-softs built-in 
windows webfolder interface.  Could anyone please help?  Many thanks in advance.


HttpURL httpUrl = new HttpURL(stUrl);
httpUrl.setUserInfo(stUsername, stPassword);
WebdavResource resource = new WebdavResource(httpUrl);
resource.setDebug(Integer.MAX_VALUE);
boolean fExists = resource.getExistence();
String stDirName = stUrl + "/Test" + System.currentTimeMillis();
boolean fSucceeded = resource.mkcolMethod(stDirName);


Here is the output.  I see no indication that it is even sending my user info.

MKCOL /DAV/Test1033518297372 HTTP/1.1
Content-Length: 0
Host: alan
User-Agent: Jakarta HTTP Client/1.0

HTTP/1.1 401 Unauthorized
Server: Microsoft-IIS/5.0
Date: Wed, 02 Oct 2002 00:24:57 GMT
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
Connection: close
Content-Type: text/html
Content-Length: 4046

Closing connection
Reopen connection : Host:alan Port:80
org.apache.commons.httpclient.HttpException: Unable to process request
 at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:657)
 at org.apache.webdav.lib.WebdavResource.mkcolMethod(WebdavResource.java:3033)
 at transfer.WebDavWrite.streamContents(WebDavWrite.java:94)



---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

Reply via email to