WebDav & NTLM & IIS
"Pablo Mosquera Saenz" <[email protected]>
| Newsgroups | gmane.comp.jakarta.slide.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, Im working in a project with MVC and struts and we need to use a
document repository in a IIS server
I created an utility class that implements the common methods for the
webdav. Im using the slide 2.1 version and I use this code
NTCredentials creds = new NTCredentials(user, pass, hostadd,
domainName);
HostConfiguration hostConfig = new HostConfiguration();
hostConfig.setHost(hostadd); //Not url, just ip address or fully
qualified DN
HttpURL host = new HttpURL(url);
wdr = new WebdavResource(host, (Credentials)creds,
WebdavResource.DEFAULT, DepthSupport.DEPTH_1);
wdr.setDebug(3);
String wdrpath = wdr.getPath();
And I have the Exception
org.apache.commons.httpclient.HttpException
at org.apache.webdav.lib.WebdavResource.propfindMethod(
WebdavResource.java:3467)
at org.apache.webdav.lib.WebdavResource.propfindMethod(
WebdavResource.java:3423)
at org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
:967)
at org.apache.webdav.lib.WebdavResource.setDefaultProperties(
WebdavResource.java:954)
at org.apache.webdav.lib.WebdavResource.setProperties(
WebdavResource.java:1897)
at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java
:1301)
at org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:206)
at gitae.util.webdav.WebdavUtil.listar(WebdavUtil.java:83)
at gitae.util.webdav.WebdavUtil.main(WebdavUtil.java:43)
java.lang.Exception: org.apache.commons.httpclient.HttpException
at gitae.util.webdav.WebdavUtil.listar(WebdavUtil.java:106)
at gitae.util.webdav.WebdavUtil.main(WebdavUtil.java:43)
Caused by: org.apache.commons.httpclient.HttpException
at org.apache.webdav.lib.WebdavResource.propfindMethod(
WebdavResource.java:3467)
at org.apache.webdav.lib.WebdavResource.propfindMethod(
WebdavResource.java:3423)
at org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java
:967)
at org.apache.webdav.lib.WebdavResource.setDefaultProperties(
WebdavResource.java:954)
at org.apache.webdav.lib.WebdavResource.setProperties(
WebdavResource.java:1897)
at org.apache.webdav.lib.WebdavResource.setHttpURL(WebdavResource.java
:1301)
at org.apache.webdav.lib.WebdavResource.<init>(WebdavResource.java:206)
at gitae.util.webdav.WebdavUtil.listar(WebdavUtil.java:83)
... 1 more
I think that I have a problem with the parameters hostAdd and domainName
I use as domainName the domain where the webdav server is, but hostAdd, im
not sure if it should be the address of the client or the the address of the
webdav server.
The userName and password are correct. I use as userName a string without
the domain name. For example "userName" and not "userName@domain" or
"domain\\user"
Hope anyone can help. If its neccesary I would give the concrete url and
parameters to test the connection to the webdav server
Thanks