|
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
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.
On CRX Welcome Screen, select Package.
In Package Manager, click on the login widget in the upper-right corner of the screen. Log in to CRX as administrator (admin/admin).
Select Package Share icon from the top navigation bar (the right-most icon).
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.
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.
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.
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.
The package is now installed:
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.
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
Click Submit. The CMIS Explorer browser opens.
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
Then, browse for the same file in CMIS Explorer:
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:
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:
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
JSON representation of the JCR node of the uploaded resource:
- http://localhost:7402/apps/firststeps/uploaded-via-cmis.txt.json
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

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
|
|
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.
Perhaps somebody from Day can shed light.
-- Juerg
It does not "translate" custom JCR node types.
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
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
Note: Customers with DayCare user accounts need to create a new account for use on day.com.