commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Carman <ja...@carmanconsulting.com>
Subject Re: Cannot connect to a webDAV server
Date Mon, 02 Feb 2009 19:36:01 GMT
Correct, but WebDAV isn't a "core" provider yet.  So, it's defined here:

http://svn.apache.org/repos/asf/commons/proper/vfs/trunk/sandbox/src/main/resources/META-INF/vfs-providers.xml

And, Mark was correct also.  You can turn up logging and it will show
you what is being registered and what is not.

On Mon, Feb 2, 2009 at 11:51 AM, Ralph Goers <ralph.goers@dslextreme.com> wrote:
> I'm not sure if we are speaking past each other here. There is no
> vfs-providers.xml in the core source, so none of those providers should be
> automatically configured. Instead, the user has to create the file and
> configure the providers they want. Correct?
>
> Ralph
>
> On Feb 2, 2009, at 8:25 AM, James Carman wrote:
>
>> The plugin (non-core) providers are also auto-registered that way.
>>
>> On Mon, Feb 2, 2009 at 11:22 AM, Ralph Goers <ralph.goers@dslextreme.com>
>> wrote:
>>>
>>> Right. that is a config file, not a provider. The user has to configure
>>> the
>>> providers they want.
>>>
>>> On Feb 2, 2009, at 7:27 AM, James Carman wrote:
>>>
>>>> It scans the classpath for all resources named
>>>> "META-INF/vfs-providers.xml":
>>>>
>>>>
>>>>
>>>> http://svn.apache.org/repos/asf/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/impl/StandardFileSystemManager.java
>>>>
>>>>
>>>> On Mon, Feb 2, 2009 at 10:01 AM, Ralph Goers
>>>> <ralph.goers@dslextreme.com>
>>>> wrote:
>>>>>
>>>>> It's possible I'm missing something. Where does that happen? I'm not
>>>>> seeing
>>>>> anything call addProvider based on the class path.
>>>>>
>>>>> Ralph
>>>>>
>>>>> On Feb 2, 2009, at 4:27 AM, James Carman wrote:
>>>>>
>>>>>> Shouldn't it auto-register, if it's on the classpath?
>>>>>>
>>>>>> On Mon, Feb 2, 2009 at 12:53 AM, Ralph Goers
>>>>>> <ralph.goers@dslextreme.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I don't see where you registered the webdav provider with the
>>>>>>> manager.
>>>>>>> You
>>>>>>> shouldn't need to call WebdavFileSystemConfigBuilder.getInstance().
>>>>>>> instead,
>>>>>>> follow one of the methods shown at
>>>>>>> http://commons.apache.org/vfs/api.html to
>>>>>>> add the WebdavFileProvider.
>>>>>>>
>>>>>>> Whether or not you get this working, please post back with your
>>>>>>> results
>>>>>>> along with info about the webdav server you are connecting to.
I've
>>>>>>> only
>>>>>>> tested with Day CRX (which is really Jackrabbit as far as WebDAV
is
>>>>>>> concerned) so I'd like to know what your results are.
>>>>>>>
>>>>>>> Ralph
>>>>>>>
>>>>>>>
>>>>>>> On Feb 1, 2009, at 8:25 PM, Manish Saroha wrote:
>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> I am new to webDAV and trying to connect to a webDAV server
using
>>>>>>>> the
>>>>>>>> commons VFS.
>>>>>>>> Checked out the source code and builded the
>>>>>>>> *commons-vfs-2.0-SNAPSHOT.jar
>>>>>>>> *using the ant task "jar".
>>>>>>>>
>>>>>>>> my code to connect is as follows:
>>>>>>>>
>>>>>>>> static public FileObject getFileObject() throws FileSystemException
>>>>>>>> {
>>>>>>>> String scheme = "webdav://" ;
>>>>>>>> String hostName = "sakai-vre.its.monash.edu.au" ;
>>>>>>>> int port = 8080;
>>>>>>>> int defaultPort = 8080;
>>>>>>>> String userName = "username";
>>>>>>>> String password = "password" ;
>>>>>>>> String path = "dav/a9d8c946-4bbf-4c2b-8db5-0a62c8724683/";
>>>>>>>>      String uriString = scheme + userName + ":" + password
+ "@" +
>>>>>>>> hostName + ":" + port + "/" + path;
>>>>>>>> //String uriString = scheme + hostName + ":" + port + "/"
+ path;
>>>>>>>>      StaticUserAuthenticator auth = new
>>>>>>>> StaticUserAuthenticator(null, userName, "password");
>>>>>>>> FileSystemOptions opts = new FileSystemOptions();
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(opts,
>>>>>>>> auth);
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> WebdavFileSystemConfigBuilder.getInstance().setProxyAuthenticator(opts,
>>>>>>>> auth) ;
>>>>>>>>     return VFS.getManager().resolveFile(uriString, opts);
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I am getting this error
>>>>>>>>
>>>>>>>> 15:19:27,953  INFO DefaultFileReplicator:122 - Using
>>>>>>>> "D:\DOCUME~1\masaroha\LOCALS~1\Temp\vfs_cache" as temporary
files
>>>>>>>> store.
>>>>>>>> org.apache.commons.vfs.FileSystemException: *Badly formed
URI
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> "webdav://username:password@sakai-vre.its.monash.edu.au:8080/dav/a9d8c946-4bbf-4c2b-8db5-0a62c8724683/".*
>>>>>>>> at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:85)
>>>>>>>> at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:662)
>>>>>>>> at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:582)
>>>>>>>> at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> au.edu.jcu.hermes.core.filesystem.WebDavConnector.getFileObject(WebDavConnector.java:107)
>>>>>>>> at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> au.edu.jcu.hermes.core.filesystem.WebDavConnector.main(WebDavConnector.java:22)
>>>>>>>> *Caused by: java.net.MalformedURLException: unknown protocol:
>>>>>>>> webdav*
>>>>>>>> at java.net.URL.<init>(URL.java:574)
>>>>>>>> at java.net.URL.<init>(URL.java:464)
>>>>>>>> at java.net.URL.<init>(URL.java:413)
>>>>>>>> at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> org.apache.commons.vfs.provider.url.UrlFileProvider.findFile(UrlFileProvider.java:66)
>>>>>>>> ... 4 more
>>>>>>>>
>>>>>>>> Any help or guideline would be appreciated.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Manish
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message