Hi Stephan, I'm french and I'm not so good in english. So I have a question: Is the code working with a newer version of httpclient than 2.0.2<http://2.0.2./>or must I use the patch you have posted to the forum ?
Thanks a lot for your help, Yannick 2008/6/5 Stephan Schuster <[EMAIL PROTECTED]>: > hi yannick, > > the short answer: i had the same problem about a week ago and fixed it! > > the long answer: as you probably know commons-vfs uses jakarta slide for > its webdav support. however, jakarta slide unfortunately retired at the of > 2007. that's why jason harrop startet webdavclient4j [1] a few weeks ago. it > is a new project that basically ports and improves the slide sources, for > example you can use a newer version of httpclient than 2.0.2. but most > important it integrates nicely with commons-vfs and vfsjfilechooser. i use > both in my current project. > > now, why am i telling you this??? > > because i experienced the same problem a few weeks ago. the reason is that > the webdav provider (of jakarta slide / webdavclient4j) does not respect the > credentials set via StaticUserAuthenticator and > DefaultFileSystemConfigBuilder. so i checked out the code of webdavclient4j > and fixed it along with the implementation of an additional provider: > webdavs (webdav over https). afterwards i posted the patch to the website's > forum [3] and sent it per mail to jason harrop. so far he obviously hadn't > had the time to apply the patch and release a new version of webdavclient4j. > that's why you have to checkout webdavclient4j, patch it with the stuff i > wrote, build it yourself and then use it with commons-vfs. of course you > could do the same with jakarta slide but i wouldn't recommend that since > it's a dead project. besides that i could send you my build of > webdavclient4j but i'm not sure if that is what jason harrop wants. so i > can't do this unless he tells me to do so. > > hope that helps. > > > cheers, > stephan > > ps: @jason: if you want you could grant me developer rights for your > projects. then i could do the necessary stuff myself and help yannick. > > > [1] http://sourceforge.net/projects/webdavclient4j/ > [2] http://vfsjfilechooser.sourceforge.net > [3] > http://sourceforge.net/forum/forum.php?thread_id=2057078&forum_id=806778 > > > > > Yannick PIERSON wrote: > >> 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, >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
