Enabling CMIS Services in CRX

Note

CMIS services in CRX is a pre-release technology, and it is covered by the Early Access Technology license.

CMIS, or Content Management Interoperability Services, is a standard defining a unified data model and access methods to documents stored in multiple content repositories from different vendors. CMIS defines protocol bindings for two protocols, AtomPub and SOAP. The development of the standard is governed by the CMIS Technical Committee of the OASIS organization.

CRX provides a CMIS services module, which enables any CMIS client application or system to interoperate with CRX. The focus of CMIS on interoperability complements CRX content repository infrastructure based on JCR 2 standard, and further extends the standard interfaces to content managed within CRX, which include JCR with its local and remote access APIs, RESTful Web Services, WebDAV, and CIFS/SMB.

Read the dev.day.com blog on JCR - CMIS Comparison to learn more about both standards and how they relate to each other.

This guide will help you understand how to:

  • enable CMIS services for CRX in your repository instance
  • see the interoperability in action by using a CMIS client to connect to CRX
  • get access to content managed in CRX from the CMIS client
  • add content to CRX from the CMIS client

Enabling CMIS Services

CMIS services module for CRX is available on Day Package Share. In order to enable CMIS services in your CRX, please follow the steps outlined below.

In the examples, we assume that you already have CRX running on the default port on the local machine (http://localhost:7402/). Otherwise, download CRX from www.day.com/crx and start the instance by double-clicking the CRX Quickstart distribution jar file.

  1. On CRX Welcome Screen, select Package.

    file
  2. In Package Manager, click on the login widget in the upper-right corner of the screen. Log in to CRX as administrator (admin/admin).

    file

    Select Package Share icon from the top navigation bar (the right-most icon).

  3. Login to Package Share using your account (email address), with which you have registered at www.day.com, or requested the CRX Developer Edition license.

    In case you forgot the password, please use the Reset Password page.

    In case you don't have an account yet, use the Register Here link in the login dialog.

    file
  4. Find the content package for CMIS services module. It is called  crx-cmis-server-package.

    There is a chance the package will be shown on the welcome page. Click to navigate to it, and then click on the folder containing the package (folder) in the breadcrumb navigation, to have access to the Download button.

    Or simply search for "cmis" in the package share, and open the crx-cmis-server-package. Alternatively, navigate to Public » Day » CRX 2.1.0 » feature page, and the package will be there.

    file
  5. Press Download button next to the package. It will download the package directly to your CRX instance. Wait while the package is downloaded to your local instance. When the button changes to Downloaded, click the button and you will access the package in your local Package Manager.

    file
  6. In CRX Package Manager, click the Install button for the package, and confirm the default installation settings. Make sure there were no installation errors or warnings shown in the console.

    file

    The package is now installed:

    file

Congratulations! Your CRX now exposes JCR content through CMIS services on

  • http://<host>:<port>/cmis/repository

via CMIS AtomPub protocol.

Next, you can use a CMIS client supporting AtomPub to access the repository.

Trying out CMIS - JCR Interoperability

To see how content managed in CRX content repository is now open to integrate with CMIS-enabled applications and systems, you can do the following:

  • Install or use a CMIS-enabled client application. There are many out there, just find one using your favorite search engine looking for a "cmis client"
  • Configure it to connect to your CRX server via http://<host>:<port>/cmis/repository URL.
  • Discover the CRX content

Despite the CMIS standard being still in inception, there are really a lot of various CMIS-enabled applications already. On the other hand, there is no guarantee that they would work with your CMIS server given that the standard is not finalized yet.

To illustrate the interoperability, we chose Shane Johnson's CMIS Explorer. It is a desktop application build on the Adobe AIR Rich Internet Application (RIA) platform, and the full source code is available.

Install CMIS Client

CMIS Explorer requires Adobe AIR platform to be installed. Please download and install it if you don't have it already before proceeding.

Download and install the CMIS Explorer on your computer. Version 1.0 is also included in the CRX CMIS Server package, you can download it directly from CRX by using this link in the browser (assuming you are running the default installation):

Once downloaded, install it by opening it on your desktop machine. It should get installed via Adobe AIR platform.

Access CRX Content from CMIS Client

Log in to CRX's CMIS services endpoint by specifying the following connection parameters in the CMIS Explorer login window:

  • Repository: http://localhost:7402/cmis/repository
  • User: admin
  • Pass: admin
file

Click Submit. The CMIS Explorer browser opens.

file

You can now check reported CMIS capabilities and mapped content types in the respective tabs.

Click the Browser tab to see CRX-managed content accessible to the CMIS client application. E.g., navigate to edit.esp file in CRXDE Lite (http://localhost:7402/crx/de/)

  • /apps/firststeps/edit.esp
file

Then, browse for the same file in CMIS Explorer:

file

You can download the file to your desktop by clicking Download and selecting a folder on your disk.

Note

CMIS interoperability with CRX also includes searching for content via CMIS search API. In this preview version of CRX CMIS services search does not work due to the bug CMIS-188 in the Apache Chemistry module used as the underlying CMIS provider implementation. It will be fixed and included in the final release of CRX CMIS services.

Upload Content to CRX Repository via CMIS Client

CMIS interoperability with CRX repository also includes writing content to CRX via CMIS clients.

To try it out, upload a file from your desktop using CMIS Explorer. In a text editor create a new text file, e.g., uploaded-via-cmis.txt, enter some text and save it. Click Upload and select the file:

file

Now, check that the file is immediately available in the CRX repository.

Open CRXDE Lite and go to /apps/firststeps node. The just-uploaded file should appear as the last sub-node (you might need to refresh the view in CRXDE Lite to see it). Double click the new node to see its content in the editor pane:

file

Your content is now stored in and managed by the CRX enterprise content repository. You have turned it into an "open asset", which is available to other systems and applications via CRX standard interfaces and protocols:

  • JCR: available to JCR-enabled applications, and all Java applications
  • CMIS: available to CMIS-enabled applications
  • REST and HTTP: available to Day CQ5 applications, or any other RESTful or HTTP-enabled applications; this basically makes your content available to Web 2.0, AJAX-based web applications
  • WebDAV & CMIS: available to desktop users and filesystem-based applications

 

As an example, you can access the uploaded file as a REST resource by opening its URL and choosing desired representation (rendering) in your browser.

Default file content representation of the uploaded resource.

  • http://localhost:7402/apps/firststeps/uploaded-via-cmis.txt
file

JSON representation of the JCR node of the uploaded resource:

  • http://localhost:7402/apps/firststeps/uploaded-via-cmis.txt.json
file

JSON representation of the JCR node of the uploaded resource, and 1 level of sub-nodes:

  • http://localhost:7402/apps/firststeps/uploaded-via-cmis.txt.1.json
file

Next Steps

In this guide, you have learned what CMIS is, how it relates to the JCR standard, and how to enable and use CMIS services in CRX. The CMIS services further extend CRX's open, standard based set of interfaces and interoperability protocols it supports.

Suggested next steps are:

  • Visit dev.day.com developer's portal to learn more about CRX, CQ5, standards like JCR and CMIS, and content technologies
  • Learn about other Day content integration products, Day JCR Connectors and Adapters, including JCR connectors for Microsoft SharePoint, EMC Documentum, OpenText Livelink, generic Databases / JDBC data sources and other third-party repositories.
  • Check www.day.com for the latest Day product news, events, webinars and screencasts, as well as product downloads
  • Check docs.day.com documentation platform for the in-depth information about Day products

Your comments are welcome.
Did you notice a way we could improve the documentation on this page? Is something unclear or insufficiently explained? Please leave your comments below and we will make the appropriate changes. Comments that have been addressed, by improving the documentation accordingly, will then be removed.

COMMENTS

  • By akoloskov - 3:02 PM on Jun 22, 2010   Reply
    Using Day Node Type Administration tool I have added my custom namespace "mynsp", than I have created custom node type "mynsp:mytype" (supertype is "nt:unstructured") and defined my custom properties "mynsp:foo" (string) and "mynsp:bar" (string). Than using Day Content Explorer tool I have created new node of my custom type "mynsp:mytype", and manually set values for properties "mynsp:foo" and "mynsp:bar"

    Now I want to get my custom properties using CMIS, but unfortunately there are just :
    cmis:objectId 2d1c5006-5224-4fdf-bdcd-55c6cde768dc
    cmis:objectTypeId cmis:document
    cmis:baseTypeId cmis:document
    cmis:name My test node name

    How can I get my custom node properties using CMIS. I tried cmis-explorer-1.0.air as well as tried to find them in XML documents, there are no any custom properties at all.
    • By jcr - 8:50 PM on Jun 22, 2010   Reply
      I don't see any evidence either that CRX CMIS delivers custom properties.
      Perhaps somebody from Day can shed light.

      -- Juerg
      • By aheimoz - 12:25 PM on Jun 23, 2010   Reply
        Yes, the CRX CMIS server only displays the standard CMIS node types.
        It does not "translate" custom JCR node types.
    • By vivien.berthuol - 11:23 PM on Jul 27, 2010   Reply
      I succeded in installing the CMIS package and CMIS client, and browsing the CRX content via the CMIS client, but was unable to upload a file from the cmis client to the CRX. Any known issues about this?
      • By sri raj - 10:19 AM on Aug 04, 2010   Reply
        I am also unable to upload files using Shane Johnson's CMIS Explorer. Downloading is working fine
        • By Dilip - 10:17 AM on Dec 07, 2010   Reply
          For me, both uploading and downloading does not work. When I click on either upload or download from AIR explorer, it opens up another window with status 100% but never completes the operation. I'm using CRX 2.1.0 server with crx-cmis-server-package-2.1.0.zip. I have used chemistry client API to create a new folder/document which fails every time with the message "Property cmis:objectTypeId must be set!" even though I'm setting this property exclusively. Are these known problems?
          • By Steve Reiner - 10:31 PM on Jun 22, 2011   Reply
            The CMIS Spaces client also works with CRX. Its available from http://code.google.com/p/cmisspaces/ Install the latest air file (currently CMISSpacesAir-bld18.air)
            Need to set in C:\Program Files (x86)\CMISSpacesAir\CMISSpacesConfig.xml (for x64 windows) to have the cmisUrl entry for <property name="cmisUrl" value="http://localhost:7402/cmis/repository"/> uncommented and comment out the Alfresco one (and set host name and port for your particular setup) (Windows 7, need to add permission to write to this xml file)(Note for 32 bit windows in c:\Program Files) (for Mac in finder choose "Show Package Contents" on installed CMISSpacesAir.app, CMISSpacesConfig.xml is in contents/resources/ )
            Then launch and login with admin/admin.
            Things that work on CRX: navigation, view properties, upload/download (via menus/icons/drag/drop), "new folder" in certain folders (must be read-only or a permission thing in some folders)
            Things that work on Alfresco but didn't on CRX: checkout, basic search
            Note: copy / paste works from desktop into CRX. Copy/cut/paste for content between crx folders is not implemented due to CMIS 1.0 atom rest spec not supporting copy
            • By Shubham - 11:20 AM on Jul 05, 2011   Reply
              When I try to use CMIS explorer to connect to http://<localhost>:<port>/cmis/repositories, the login failed and I see the following error in error.log:
              ERROR* [SCR Component Actor] org.apache.chemistry.jcr.JcrRepository Unable to determine root folder id. javax.jcr.AccessDeniedException: cannot read item cafebabe-cafe-babe-cafe-babecafebabe
              at org.apache.jackrabbit.core.ItemManager.createItemData(ItemManager.java:814)
              at org.apache.jackrabbit.core.ItemManager.getItemData(ItemManager.java:399)
              at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:336)
              at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:615)
              at org.apache.jackrabbit.core.ItemManager.getRootNode(ItemManager.java:524)
              at org.apache.jackrabbit.core.SessionImpl.getRootNode(SessionImpl.java:843)
              at org.apache.sling.jcr.base.internal.PooledSession.getRootNode(PooledSession.java:193)
              at org.apache.chemistry.jcr.JcrRepository.getRootFolderId(JcrRepository.java:278)
              at org.apache.chemistry.atompub.server.CMISProvider.<init>(CMISProvider.java:122)
              at org.apache.chemistry.atompub.server.servlet.CMISServlet.createProvider(CMISServlet.java:46)
              at org.apache.abdera.protocol.server.servlet.AbderaServlet.init(AbderaServlet.java:61)

              Please let me know how to overcome this error. Any help would be appreciated

              Thanks
              Shubham
              • By ppiegaze - 11:46 PM on Aug 18, 2011   Reply
                This may be an issue with the CMIS client you are using (CMIS explorer). You might want check the google code project for that software for more info. Alternatively you may wish to try a different client. If the problem persists, please give us a detailed description so that we can file a bug.
              • By Andy Shreve - 2:08 AM on Apr 05, 2012   Reply
                This page has a typo: "runinng."
                • By aheimoz - 6:21 AM on Apr 05, 2012   Reply
                  Thanks for your feedback, we've corrected this typo.
                • By solay - 12:25 PM on Apr 22, 2012   Reply
                  it worked fine for me!

                  ADD A COMMENT

                   

                  In order to post a comment, you need to sign-in.

                  Note: Customers with DayCare user accounts need to create a new account for use on day.com.

                  ***