Chapter 14. Building a CMIS server

This chapter covers

  • Generating a CMIS server stub with the OpenCMIS Server Framework
  • Testing a CMIS server for compliance
  • Using the OpenCMIS query parser
  • Changing the authentication mechanism

In the previous chapters, we looked at CMIS mainly from a client perspective. In this chapter, we’re changing sides and explaining how to build a CMIS server. You’ll learn how to build a CMIS frontend on top of an existing content repository (or similar data source) with the OpenCMIS Server Framework. For this chapter, you should know how to work with servlets and understand the general concepts relating to building web applications.

14.1. Introduction to the OpenCMIS Server Framework

It’s hardly surprising that a CMIS server is an upside-down version of a CMIS client. All the principles we’ve discussed in this book apply here, too. Similar to a CMIS client, you can either implement the CMIS bindings yourself or use a library or framework. Using a framework obviously saves you time and effort.

In this chapter, we’ll discuss the OpenCMIS Server Framework, which is a Java server implementation of CMIS. It runs on top of a servlet engine such as Tomcat or Jetty (see figure 14.1). It implements all CMIS bindings, which means it covers all XML and JSON handling. To connect the framework to the content repository, you have to implement two Java interfaces: CmisService and CmisServiceFactory. Take a wild guess what we’ll be talking about next.

14.2. Generating a server stub

14.3. Implementing the CmisServiceFactory interface

14.4. Implementing the CmisService interface

14.5. Testing the CMIS server with the OpenCMIS TCK

14.6. AtomPub differences

14.7. Parsing a CMIS query

14.8. Extracting authentication information

14.9. CMIS extensions

14.10. Supporting CMIS 1.0 and CMIS 1.1

14.11. Summary