CMIS, Chemistry and SAPERION Content Repository


Last but not least, mapping names is not the only ordeal required to achieve an integration of CMIS with SCR.

Content Management Interoperability Services (CMIS) is an upcoming standard for exposing web services     (primarily REST) on top of various types of content repositories. Among them: SAPERION Content Repository (SCR).

While CMIS is in the making, Apache Chemistry is a readily available implementation that delivers most of what is needed to make CMIS work on top of SCR.

With a bit of coaching—thanks to Daniel for being patient with me and an avalanche of debug messages—I managed to make Chemistry run on one of our latest Velocity VMs. Below you can see a screenshot of CMIS explorer accessing SCR.

Screenshot CMIS Explorer on SCR

Screenshot CMIS Explorer on SCR

Because the SPI code of Chemistry lacked necessary functionality, I implemented dynamic node type discovery and integrated mapping between CMIS and SCR names.

The node type discovery works like this:

Session session = repository.login(creds, workspace);
NodeTypeIterator allNodeTypesIter = session.getWorkspace()
List<Type> result = new ArrayList<Type>();
while (allNodeTypesIter.hasNext()) {
   NodeType nodeType = allNodeTypesIter.nextNodeType();
   BaseType baseType = BaseType.FOLDER;
   if (JcrCmisMap.isBaseTypeDocument(nodeType.getName()))
       baseType = BaseType.DOCUMENT;
   // several more validity checks not mentioned here
   result.add(new JcrType(nodeType, baseType));

Filling the mapping dictionary and finally making Chemistry really fly involved a lot of debug nastiness, including simple debug messages such as:

   log.error("Property Name of Node: " + p.getName()
       + " Value: " + p.getValue().getString());

and tracing XML-based messaging using Wireshark’s  “follow tcp stream” feature.

XML Debug Output

XML Debug Output

Last but not least, mapping names is not the only ordeal required to achieve an integration of CMIS with SCR. Since the data models of SCR and CMIS are different, handling property value types such as Boolean, String and Date and their mapping was also important as well as the one or other sleight of hand ;-)

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to MySpace

Download PDF
Written by Michael Mertins in: english,products | Tags: , , , ,


  • Michael,

    I just can say: Good job man! I know that it was a lot of hard work to understand the JCR, CMIS and the SAPERION Backend with SCR. 3 new technologies for you. So I’m happy that in the end everything is working.
    I agree that CMIS is a upcoming standard, but I think it’s far far away from being finished and on the other hand Chemistry can only be finished if the CMIS will be. So both the Standard and the Project have a long way to go.

    But your work showed us that the Standard and the Project are on a good way and SAPERION has done a pretty good job with the SAPERION Content Repository.

    In the end I’m happy that you finished your task. We should have a look if we can find a date where we both and the larix/scr team could have a beer together.

    I wish you a nice weekend.

    P.S: May be the Chemistry guys are interested in your Code? Ask them!

    Comment | 25 September 2009
  • Thanks Daniel,

    I gladly accept :-)

    The code is already in the Apache Jira Issue handler for a while and I recently updated my patch. It\’s pretty big and I hope they will integrate it before shifting to the probably final version 0.7.

    I also liked the article from Martin and your discussion therein (German):

    Comment | 29 September 2009

RSS feed for comments on this post. TrackBack URL

Leave a comment

6 − = three

Theme: Web Templates | Bankwechsel Umschuldung, Iplexx IT Solutions