3 Replies Latest reply on May 2, 2014 3:39 PM by Randall Hauch

    API access to remote WebDAV-repository

    Rickard Hermansson Newbie


      I would like to connect to a remote repository via the java API. Most examples show how to load a configuration file using the ModeShapeEngine.


      How ever, I need to connect to a WebDAV accessible repository. I have deployed the modeshape-webdav application on my JBoss server and would like to use the sample repository there for experimenting.

      How do establish a session to that repository?


      I noticed that the repositories are configured inside the standalone-modeshape.xml, this is obviously different than the json files. I assume this is how repositories is configured in WebDAV.

      Does the API bridge WebDAV to JCR?


      I have no prior experience of ModeShape or JCR, hence all the questions.


        • 1. Re: API access to remote WebDAV-repository
          Randall Hauch Master

          ModeShape does not offer a way to obtain a JCR Session connected to a remote JCR repository. It's been on the roadmap for a long time, but the level of effort of implementing this has simply been too high. Many (most?) of the JCR API features are very difficult to make work over a remote connection. The result would be that we'd likely have to maintain a long list of which methods worked remotely and which didn't.


          So for ModeShape, Sessions can only be used locally within the ModeShape cluster. Remote processes can interact with ModeShape through our provided RESTful service, WebDAV, JDBC (just for JCR-SQL2 queries, and no create, update or delete statements), or via your own custom web service that exposes exactly the methods/operations/procedures that you need.

          • 2. Re: API access to remote WebDAV-repository
            Rickard Hermansson Newbie

            Ok, what I really need is to create a repository that is accessible for WebDAV-clients. That is why I wanted to connect to the remote repository, since it's WebDAV accessible.


            The goal is to create repository that manageable via a web ui, the repository will mainly contain documents. Most of those documents will, if possible, enter the repository via WebDAV.

            This section: ModeShape in web applications - ModeShape 3 - Project Documentation Editor, describe how I can solve half the equation. I'm having trouble figuring out the WebDAV part.

            • 3. Re: API access to remote WebDAV-repository
              Randall Hauch Master

              First of all, have you tried using our existing WebDAV service? It already works, and is simply a web application that runs in the same process as ModeShape, but allows remote clients to read/write content over WebDAV.


              If it does not suit your needs, then we'd be interested in hearing why it does not. There are always options to expand our functionality, and that's something that could be done by you so the rest of the community can benefit. But if the changes you would make are not general purpose, then we still might have the option of making our WebDAV service such that you can provide custom extensions.


              Implementing a new WebDAV service is always an option, but as you can see by ours its fairly complex. It'd be a shame if you had to start over from scratch.