You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Trasca Virgil <vi...@yahoo.com> on 2010/06/16 09:03:03 UTC

[VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

Hi,

      From the VfsCapabilitiesMatrix I was not able to see if commons vfs supports to copy files to Samba, Windows network shared drives and WebDAV servers. Is it possible to do that?

Also is it possible to create zip,bz2 and gzip archives using the library?

Thank you,
Virgil

Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

Posted by Trasca Virgil <vi...@yahoo.com>.
Hi,

     the server is Apache with mod_webdav

the response from the server is 

17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << 
"<title>405 Method Not Allowed</title>[\n]"
> 
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << 
"</head><body>[\n]"
> 17/06/2010 12:04:00 DEBUG 
httpclient.wire.content.wire - << "<h1>Method Not 
Allowed</h1>[\n]"
> 17/06/2010 12:04:00 DEBUG 
httpclient.wire.content.wire - << "<p>The requested method 
PROPFINDis not allowed for the UR

 
Do you have an idea what this error means?

Thank you,
Virgil
http://java-hobby.blogspot.com/




________________________________
From: Ralph Goers <ra...@dslextreme.com>
To: Commons Users List <us...@commons.apache.org>
Sent: Mon, June 21, 2010 4:40:33 PM
Subject: Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

You are correct that in trunk webdav uses Jackrabbit and is no longer part of the sandbox.

I would suggest looking at the logs on the server to see if it is providing any information. What software is providing the webdav support on the server?

Ralph

On Jun 21, 2010, at 12:00 AM, Trasca Virgil wrote:

> Hi,
> 
>     Does anybody has an idea why this WebDAV problem might come?
> 
> Thank you,
> Virgil
> http://java-hobby.blogspot.com/
> 
> 
> 
> 
> ________________________________
> From: Trasca Virgil <vi...@yahoo.com>
> To: Commons Users List <us...@commons.apache.org>
> Sent: Thu, June 17, 2010 7:47:17 PM
> Subject: Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
> 
> Hi ,
> 
> Thanks for your answer. I am trying to use commons-vfs with webdav. On the site is saying that I need the sandbox with httpclient2.0
> 
> 
> However when I started to build vfs core+ sandbox trunk 2.0 I found that I need jackrabbit webdav provider and http client 3.0
> 
> With core + sandbox trunk20 + jackrabbit + httpclient3.0 I am trying to test using http://test.webdav.org/
> 
> My connect URI is <uri>webdav://test.webdav.org/dav</uri>
> 
> Now I get the following problem
> 
> 
> 7/06/2010 12:03:59 DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody - Request body sent
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Date: Thu, 17 Jun 2010 15:57:37 GMT[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.3.2[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Allow: GET,HEAD,POST,OPTIONS,TRACE[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Length: 236[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Type: text/html; charset=iso-8859-1[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "!"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "D"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "O"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "CTYPE HTML PUBLIC "-//IETF//"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "DTD HTML 2.0//EN">[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<html><head>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<title>405 Method Not Allowed</title>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</head><body>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<h1>Method Not Allowed</h1>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<p>The requested method PROPFINDis not allowed for the URL /index.html.</p>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</body></html>[\n]"
> 
> My VFS code is the following 
> 
> FileSystemManager mgr = VFS.getManager();
>    FileObjectcwd = mgr.resolveFile(System.getProperty("user.dir"));
> 
>    final FileObject source = mgr.resolveFile(cwd, attachFilePath);
>    FileObject destination = mgr.resolveFile(cwd, dest.uri);
> 
>    if (destination.exists() && destination.getType() == FileType.FOLDER) {
>        destination = destination.resolveFile(source.getName()
>            .getBaseName());
>    }
> 
>    destination.copyFrom(source, Selectors.SELECT_ALL);
> 
> 
> 
> Do you have an idea what might be the problem?
> 
> 
> Thank you,
> Virgil
> http://java-hobby.blogspot.com/
> 
> 
> 
> 
> ________________________________
> From: Frank van derKleij <kl...@hotmail.com>
> To: user@commons.apache.org
> Sent: Thu, June 17, 2010 1:47:51 PM
> Subject: RE: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
> 
> 
> 
> See http://commons.apache.org/vfs/filesystems.html
> 
> Samba, Windows shares and Webdav are supported in the Sandbox. Zip files etc are read-only.
> 
> Frank
> 
>> Date: Wed, 16 Jun 2010 00:03:03 -0700
>> From: virgil_trasca@yahoo.com
>> Subject: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
>> To: user@commons.apache.org
>> 
>> 
>> Hi,
>> 
>>      From the VfsCapabilitiesMatrix I was not able to see if commons vfs supports to copy files to Samba, Windows network shared drives and WebDAV servers. Is it possible to do that?
>> 
>> Also is it possible to create zip,bz2 and gzip archives using the library?
>> 
>> Thank you,
>> Virgil
> 
> _________________________________________________________________
> New Windows 7: Find the right PC for you. Learn more.
> http://windows.microsoft.com/shop


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

Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

Posted by Ralph Goers <ra...@dslextreme.com>.
You are correct that in trunk webdav uses Jackrabbit and is no longer part of the sandbox.

I would suggest looking at the logs on the server to see if it is providing any information. What software is providing the webdav support on the server?

Ralph

On Jun 21, 2010, at 12:00 AM, Trasca Virgil wrote:

> Hi,
> 
>     Does anybody has an idea why this WebDAV problem might come?
> 
> Thank you,
> Virgil
> http://java-hobby.blogspot.com/
> 
> 
> 
> 
> ________________________________
> From: Trasca Virgil <vi...@yahoo.com>
> To: Commons Users List <us...@commons.apache.org>
> Sent: Thu, June 17, 2010 7:47:17 PM
> Subject: Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
> 
> Hi ,
> 
> Thanks for your answer. I am trying to use commons-vfs with webdav. On the site is saying that I need the sandbox with httpclient2.0
> 
> 
> However when I started to build vfs core+ sandbox trunk 2.0 I found that I need jackrabbit webdav provider and http client 3.0
> 
> With core + sandbox trunk20 + jackrabbit + httpclient3.0 I am trying to test using http://test.webdav.org/
> 
> My connect URI is <uri>webdav://test.webdav.org/dav</uri>
> 
> Now I get the following problem
> 
> 
> 7/06/2010 12:03:59 DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody - Request body sent
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Date: Thu, 17 Jun 2010 15:57:37 GMT[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.3.2[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Allow: GET,HEAD,POST,OPTIONS,TRACE[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Length: 236[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Type: text/html; charset=iso-8859-1[\r][\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "!"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "D"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "O"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "CTYPE HTML PUBLIC "-//IETF//"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "DTD HTML 2.0//EN">[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<html><head>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<title>405 Method Not Allowed</title>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</head><body>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<h1>Method Not Allowed</h1>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<p>The requested method PROPFINDis not allowed for the URL /index.html.</p>[\n]"
> 17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</body></html>[\n]"
> 
> My VFS code is the following 
> 
> FileSystemManager mgr = VFS.getManager();
>    FileObjectcwd = mgr.resolveFile(System.getProperty("user.dir"));
> 
>    final FileObject source = mgr.resolveFile(cwd, attachFilePath);
>    FileObject destination = mgr.resolveFile(cwd, dest.uri);
> 
>    if (destination.exists() && destination.getType() == FileType.FOLDER) {
>        destination = destination.resolveFile(source.getName()
>            .getBaseName());
>    }
> 
>    destination.copyFrom(source, Selectors.SELECT_ALL);
> 
> 
> 
> Do you have an idea what might be the problem?
> 
> 
> Thank you,
> Virgil
> http://java-hobby.blogspot.com/
> 
> 
> 
> 
> ________________________________
> From: Frank van derKleij <kl...@hotmail.com>
> To: user@commons.apache.org
> Sent: Thu, June 17, 2010 1:47:51 PM
> Subject: RE: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
> 
> 
> 
> See http://commons.apache.org/vfs/filesystems.html
> 
> Samba, Windows shares and Webdav are supported in the Sandbox. Zip files etc are read-only.
> 
> Frank
> 
>> Date: Wed, 16 Jun 2010 00:03:03 -0700
>> From: virgil_trasca@yahoo.com
>> Subject: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
>> To: user@commons.apache.org
>> 
>> 
>> Hi,
>> 
>>      From the VfsCapabilitiesMatrix I was not able to see if commons vfs supports to copy files to Samba, Windows network shared drives and WebDAV servers. Is it possible to do that?
>> 
>> Also is it possible to create zip,bz2 and gzip archives using the library?
>> 
>> Thank you,
>> Virgil
> 
> _________________________________________________________________
> New Windows 7: Find the right PC for you. Learn more.
> http://windows.microsoft.com/shop


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


Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

Posted by Trasca Virgil <vi...@yahoo.com>.
Hi,

     Does anybody has an idea why this WebDAV problem might come?

 Thank you,
Virgil
http://java-hobby.blogspot.com/




________________________________
From: Trasca Virgil <vi...@yahoo.com>
To: Commons Users List <us...@commons.apache.org>
Sent: Thu, June 17, 2010 7:47:17 PM
Subject: Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

Hi ,

Thanks for your answer. I am trying to use commons-vfs with webdav. On the site is saying that I need the sandbox with httpclient2.0


However when I started to build vfs core+ sandbox trunk 2.0 I found that I need jackrabbit webdav provider and http client 3.0

With core + sandbox trunk20 + jackrabbit + httpclient3.0 I am trying to test using http://test.webdav.org/

My connect URI is <uri>webdav://test.webdav.org/dav</uri>

Now I get the following problem


7/06/2010 12:03:59 DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody - Request body sent
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Date: Thu, 17 Jun 2010 15:57:37 GMT[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.3.2[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Allow: GET,HEAD,POST,OPTIONS,TRACE[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Length: 236[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Type: text/html; charset=iso-8859-1[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "!"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "D"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "O"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "CTYPE HTML PUBLIC "-//IETF//"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "DTD HTML 2.0//EN">[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<html><head>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<title>405 Method Not Allowed</title>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</head><body>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<h1>Method Not Allowed</h1>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<p>The requested method PROPFINDis not allowed for the URL /index.html.</p>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</body></html>[\n]"

My VFS code is the following 

FileSystemManager mgr = VFS.getManager();
    FileObjectcwd = mgr.resolveFile(System.getProperty("user.dir"));

    final FileObject source = mgr.resolveFile(cwd, attachFilePath);
    FileObject destination = mgr.resolveFile(cwd, dest.uri);

    if (destination.exists() && destination.getType() == FileType.FOLDER) {
        destination = destination.resolveFile(source.getName()
            .getBaseName());
    }

    destination.copyFrom(source, Selectors.SELECT_ALL);



Do you have an idea what might be the problem?


Thank you,
Virgil
http://java-hobby.blogspot.com/




________________________________
From: Frank van derKleij <kl...@hotmail.com>
To: user@commons.apache.org
Sent: Thu, June 17, 2010 1:47:51 PM
Subject: RE: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV



See http://commons.apache.org/vfs/filesystems.html

Samba, Windows shares and Webdav are supported in the Sandbox. Zip files etc are read-only.

Frank

> Date: Wed, 16 Jun 2010 00:03:03 -0700
> From: virgil_trasca@yahoo.com
> Subject: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
> To: user@commons.apache.org
> 
> 
> Hi,
> 
>       From the VfsCapabilitiesMatrix I was not able to see if commons vfs supports to copy files to Samba, Windows network shared drives and WebDAV servers. Is it possible to do that?
> 
> Also is it possible to create zip,bz2 and gzip archives using the library?
> 
> Thank you,
> Virgil
                          
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://windows.microsoft.com/shop

Re: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

Posted by Trasca Virgil <vi...@yahoo.com>.
Hi ,

 Thanks for your answer. I am trying to use commons-vfs with webdav. On the site is saying that I need the sandbox with httpclient2.0


However when I started to build vfs core+ sandbox trunk 2.0 I found that I need jackrabbit webdav provider and http client 3.0

With core + sandbox trunk20 + jackrabbit + http client3.0 I am trying to test using http://test.webdav.org/

My connect URI is <uri>webdav://test.webdav.org/dav</uri>

Now I get the following problem


7/06/2010 12:03:59 DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody - Request body sent
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "HTTP/1.1 405 Method Not Allowed[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Date: Thu, 17 Jun 2010 15:57:37 GMT[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.3.2[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Allow: GET,HEAD,POST,OPTIONS,TRACE[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Length: 236[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.header.wire - << "Content-Type: text/html; charset=iso-8859-1[\r][\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "!"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "D"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "O"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "CTYPE HTML PUBLIC "-//IETF//"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "DTD HTML 2.0//EN">[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<html><head>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<title>405 Method Not Allowed</title>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</head><body>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<h1>Method Not Allowed</h1>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "<p>The requested method PROPFIND is not allowed for the URL /index.html.</p>[\n]"
17/06/2010 12:04:00 DEBUG httpclient.wire.content.wire - << "</body></html>[\n]"

My VFS code is the following 

FileSystemManager mgr = VFS.getManager();
    FileObject cwd = mgr.resolveFile(System.getProperty("user.dir"));

    final FileObject source = mgr.resolveFile(cwd, attachFilePath);
    FileObject destination = mgr.resolveFile(cwd, dest.uri);

    if (destination.exists() && destination.getType() == FileType.FOLDER) {
        destination = destination.resolveFile(source.getName()
            .getBaseName());
    }

    destination.copyFrom(source, Selectors.SELECT_ALL);

 

Do you have an idea what might be the problem?


Thank you,
Virgil
http://java-hobby.blogspot.com/




________________________________
From: Frank van der Kleij <kl...@hotmail.com>
To: user@commons.apache.org
Sent: Thu, June 17, 2010 1:47:51 PM
Subject: RE: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV



See http://commons.apache.org/vfs/filesystems.html

Samba, Windows shares and Webdav are supported in the Sandbox. Zip files etc are read-only.

Frank

> Date: Wed, 16 Jun 2010 00:03:03 -0700
> From: virgil_trasca@yahoo.com
> Subject: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
> To: user@commons.apache.org
> 
> 
> Hi,
> 
>       From the VfsCapabilitiesMatrix I was not able to see if commons vfs supports to copy files to Samba, Windows network shared drives and WebDAV servers. Is it possible to do that?
> 
> Also is it possible to create zip,bz2 and gzip archives using the library?
> 
> Thank you,
> Virgil
                          
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://windows.microsoft.com/shop

RE: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV

Posted by Frank van der Kleij <kl...@hotmail.com>.

See http://commons.apache.org/vfs/filesystems.html

Samba, Windows shares and Webdav are supported in the Sandbox. Zip files etc are read-only.

Frank

> Date: Wed, 16 Jun 2010 00:03:03 -0700
> From: virgil_trasca@yahoo.com
> Subject: [VFS] Use commons vfs to copy files on Samba, Windows network shared drives and WebDAV
> To: user@commons.apache.org
> 
> 
> Hi,
> 
>       From the VfsCapabilitiesMatrix I was not able to see if commons vfs supports to copy files to Samba, Windows network shared drives and WebDAV servers. Is it possible to do that?
> 
> Also is it possible to create zip,bz2 and gzip archives using the library?
> 
> Thank you,
> Virgil
 		 	   		  
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://windows.microsoft.com/shop