Hi,
I'm using commons VFS and I get a problem.
To access to virtual file system, I'm using this authentification :
this.auth = new StaticUserAuthenticator(credentials.getDomain(),
credentials.getUsername(), credentials.getPassword());
This code works whith smb protocol (share windows), but doesn't work with
webdav :
For it I must write the url -> webdav://user:[EMAIL PROTECTED]:port/directory.
And this code works...
But I want to use the same authentification that I'm using for smb.
Do you know why it doesn't work ?
I think my problem is on the realm definition.
My error trace :
ATTENTION: No credentials available for the 'WORKGROUP' authentication realm
at host
Exception in thread "main" org.apache.commons.vfs.FileSystemException: Could
not determine the type of file "webdav://host/directory/testFile.txt".
at
org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1345)
at
org.apache.commons.vfs.provider.AbstractFileObject.getType(AbstractFileObject.java:443)
at
org.apache.commons.vfs.provider.AbstractFileObject.exists(AbstractFileObject.java:433)
at test.UserApp.main(UserApp.java:38)
Caused by: org.apache.commons.vfs.FileSystemException
at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:190)
at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.doAttach(WebdavFileObject.java:92)
at
org.apache.commons.vfs.provider.AbstractFileObject.attach(AbstractFileObject.java:1331)
... 3 more
Caused by: org.apache.commons.httpclient.HttpException
at
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3517)
at
org.apache.webdav.lib.WebdavResource.propfindMethod(WebdavResource.java:3472)
at
org.apache.webdav.lib.WebdavResource.setNamedProp(WebdavResource.java:976)
at
org.apache.webdav.lib.WebdavResource.setDefaultProperties(WebdavResource.java:963)
at
org.apache.webdav.lib.WebdavResource.setProperties(WebdavResource.java:1923)
at
org.apache.commons.vfs.provider.webdav.WebdavFileObject.setDavResource(WebdavFileObject.java:186)
... 5 more
Regards,
Thanks,