Re: Webdav and restlet

2008-06-03 Thread Jean-Yves Cronier

 Enough workarounds exist that my company's been able to produce a full
 WebDAV level 2 provider that runs on 1.0/1.1

Where can we find this source code?

Have you some pieces of code to show us how expose resource via WebDav 
(MS Web Folders)?





Rob Heittman wrote:


I don't know if all the PROPFIND plumbing is really installed yet
(Jerome or Thierry will know...) For sure you should be using svn trunk,
or at least the 1.1 snapshot, to get the latest relevant bits.

Getting WebDAV to work fully under Restlet still runs into some speed
bumps. The official target is Restlet 1.2, though it might land earlier
if somebody contributes patches ... One of the issues I remember is in
this RFE:

http://restlet.tigris.org/issues/show_bug.cgi?id=346

Enough workarounds exist that my company's been able to produce a full
WebDAV level 2 provider that runs on 1.0/1.1, but it uses custom
Restlets instead of fitting well into the REST part of the Restlet
model, and it's got dependencies on our repository layer, so no good for
anybody else.

- Rob


On 2/7/08, *Yousef Ghandour* [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

Hey
WebDav restlet
I'm planning to use restlet to expose our file system using webdav
standards. I'm already using it for normal API calles, but faced some
problems with webdav.





Re: Webdav and restlet

2008-06-03 Thread Rob Heittman
The implementation I referred to in that particular February message was
work-for-hire for a proprietary customer.
But you might be able to find most of the relevant hints by looking at the
DAV 1 implementation with DAV 2 stubs in our GoGoEgo open source project,
gogoego.googlecode.com.  We have not yet begun to package downloadable
releases of GoGoEgo, and the code still needs cleaning and commenting, but
you can get all the interesting DAV-related examples from trunk here:
http://gogoego.googlecode.com/svn/trunk/modules/RestletFoundation/src/com/solertium/baserestlets/

In VFSResource, Dav1VFSResource, Dav2VFSResource, we are exposing the
versioned file system of our CMS, using Restlet resources, in a way that is
compatible with MS Web Folders as well as South River Webdrive and wdfs.  I
use this implementation all day, every day with wdfs to do mission critical
work; it's well exercised.

You can see in Dav2VFSResource where the lock and unlock support would be if
the underlying storage supported locking semantics ... the fact that it's
not implemented here isn't Restlet's fault, but GoGoEgo's open source VFS
layer doesn't yet support locking.  Dav2VFSResource fakes it to keep
certain clients happy, notably OS X.

You could do this all in a more Restlety way -- especially if you are just
working with plain old files and don't need to access a special repository
-- but most of what you see here is a port of a port of a port.  It does
contain all the necessary hints for what MS Web Folders expects to see in
its headers, etc. and some ideas of how to glue this to Restlet.  The public
GoGoEgo repository is licensed under GPL, but if you want us to grant an
individual license that is compatible with your own for any portions of this
code, just email me personally and we can make arrangements.

A final note, see in the comments of Dav1VFSResource that it intentionally
violates RFC2518 in two ways that I would recommend preserving -- but if you
want an RFC compliant version you must take these violations out.

- Rob


On Tue, Jun 3, 2008 at 7:48 PM, Jean-Yves Cronier [EMAIL PROTECTED]
wrote:

  Enough workarounds exist that my company's been able to produce a full
  WebDAV level 2 provider that runs on 1.0/1.1

 Where can we find this source code?

 Have you some pieces of code to show us how expose resource via WebDav (MS
 Web Folders)?




 Rob Heittman wrote:


 I don't know if all the PROPFIND plumbing is really installed yet
 (Jerome or Thierry will know...) For sure you should be using svn trunk,
 or at least the 1.1 snapshot, to get the latest relevant bits.

 Getting WebDAV to work fully under Restlet still runs into some speed
 bumps. The official target is Restlet 1.2, though it might land earlier
 if somebody contributes patches ... One of the issues I remember is in
 this RFE:

 http://restlet.tigris.org/issues/show_bug.cgi?id=346

 Enough workarounds exist that my company's been able to produce a full
 WebDAV level 2 provider that runs on 1.0/1.1, but it uses custom
 Restlets instead of fitting well into the REST part of the Restlet
 model, and it's got dependencies on our repository layer, so no good for
 anybody else.

 - Rob


 On 2/7/08, *Yousef Ghandour* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

Hey
WebDav restlet
I'm planning to use restlet to expose our file system using webdav
standards. I'm already using it for normal API calles, but faced some
problems with webdav.





RE: Webdav and restlet

2008-02-08 Thread Jerome Louvel

Hi Yousef,

Based on the stack trace, I tried to lookup the NPE at line 212 in Finder.
It doesn't correspond to the latest in SVN trunk nor to the latest in 1.0
branch. 

Could you test again with the latest version?

Best regards,
Jerome  

 -Message d'origine-
 De : news [mailto:[EMAIL PROTECTED] De la part de Yousef Ghandour
 Envoyé : jeudi 7 février 2008 14:55
 À : discuss@restlet.tigris.org
 Objet : Webdav and restlet
 
 Hey
 WebDav restlet
 I'm planning to use restlet to expose our file system using webdav 
 standards. I'm already using it for normal API calles, but faced some 
 problems with webdav.
 I've added a handlePropfind and allowPropfind methods to the 
 resource, and 
 for simplicity, the handlePropfind just print a message to a 
 log file, and 
 the good news is that it reaches the handlePropfind method, 
 and it did print 
 the  message, however, it threw  an exception in the way back 
 to the caller, 
 here is the exception I got:
 Feb 7, 2008 9:56:13 AM com.noelios.restlet.StatusFilter doHandle
 SEVERE: Unhandled exception or error intercepted
 java.lang.NullPointerException
 at org.restlet.Finder.allowMethod(Finder.java:212)
 at org.restlet.Finder.handle(Finder.java:150)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at org.restlet.Filter.handle(Filter.java:136)
 at org.restlet.Router.handle(Router.java:393)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at org.restlet.Filter.handle(Filter.java:136)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at 
 com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
 at org.restlet.Filter.handle(Filter.java:136)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at org.restlet.Filter.handle(Filter.java:136)
 at 
 com.noelios.restlet.application.ApplicationHelper.handle(Appli
 cationHelper.java:95)
 at org.restlet.Application.handle(Application.java:266)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at org.restlet.Filter.handle(Filter.java:136)
 at org.restlet.Router.handle(Router.java:393)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at org.restlet.Filter.handle(Filter.java:136)
 at org.restlet.Router.handle(Router.java:393)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at 
 com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
 at org.restlet.Filter.handle(Filter.java:136)
 at org.restlet.Filter.doHandle(Filter.java:107)
 at org.restlet.Filter.handle(Filter.java:136)
 at 
 com.noelios.restlet.component.ComponentHelper.handle(Component
 Helper.java:115)
 at org.restlet.Component.handle(Component.java:230)
 at org.restlet.Server.handle(Server.java:266)
 at 
 com.noelios.restlet.ServerHelper.handle(ServerHelper.java:99)
 at 
 com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHel
 per.java:87)
 at 
 com.noelios.restlet.ext.servlet.ServerServlet.service(ServerSe
 rvlet.java:121)
 at 
 javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
 er(ApplicationFilterChain.java:237)
 at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
 cationFilterChain.java:157)
 at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
 rapperValve.java:214)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:104)
 at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:520)
 at 
 org.apache.catalina.core.StandardContextValve.invokeInternal(S
 tandardContextValve.java:198)
 at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardC
 ontextValve.java:152)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:104)
 at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:520)
 at 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHost
 Valve.java:137)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:104)
 at 
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
 Valve.java:117)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:102)
 at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:520)
 at 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
 gineValve.java:109)
 at 
 org.apache.catalina.core.StandardValveContext.invokeNext(Stand
 ardValveContext.java:104)
 at 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipel
 ine.java:520)
 at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
 at 
 

Re: Webdav and restlet

2008-02-07 Thread Rob Heittman
I don't know if all the PROPFIND plumbing is really installed yet (Jerome or
Thierry will know...)  For sure you should be using svn trunk, or at least
the 1.1 snapshot, to get the latest relevant bits.

Getting WebDAV to work fully under Restlet still runs into some speed
bumps.  The official target is Restlet 1.2, though it might land earlier if
somebody contributes patches ...  One of the issues I remember is in this
RFE:

http://restlet.tigris.org/issues/show_bug.cgi?id=346

Enough workarounds exist that my company's been able to produce a full
WebDAV level 2 provider that runs on 1.0/1.1, but it uses custom Restlets
instead of fitting well into the REST part of the Restlet model, and it's
got dependencies on our repository layer, so no good for anybody else.

- Rob


On 2/7/08, Yousef Ghandour [EMAIL PROTECTED] wrote:

 Hey
 WebDav restlet
 I'm planning to use restlet to expose our file system using webdav
 standards. I'm already using it for normal API calles, but faced some
 problems with webdav.




Re: Webdav and restlet

2008-02-07 Thread Alex Milowski
On 2/7/08, Rob Heittman [EMAIL PROTECTED] wrote:

 I don't know if all the PROPFIND plumbing is really installed yet (Jerome or
 Thierry will know...)  For sure you should be using svn trunk, or at least
 the 1.1 snapshot, to get the latest relevant bits.

I've been able to write a webdav-enabled set of resources with the trunk code.

It worked just fine!


--Alex Milowski