cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve a document with a single request Using CMIS

jmetzger
Champ in-the-making
Champ in-the-making
Hello,

I am a working with the Mortgage Industry Standards Maintentance Organization (MISMO) to develop the next version of their data reference model.  I have the goal of developing an implementation guide showing how the MISMO data model can support integration to a CMIS-conformant data repository. The primary use case I am trying to satisfy is that a business that has a CMIS-conformant content management system wants to send a MISMO-conformant message that references a document stored in that system.

In order to access content from a resource that has a data format that is not xml based, MISMO's data model has a container element called FOREIGN_OBJECT.  Within this container, there is a choice of using a data element called EmbeddedContentXML, which might have something like a Base64 string representing the document image, or an element called LocationURL, which tells the receiver where to retrieve the document.

My concern is that when I read the CMIS specification, I see that getting any content appears to be a two-step process, because multiple repositories can exist at the same endpoint.  First, I must call the CMIS instance's endpoint with a URL to get a list of repositories, and then make a subsequent call (or calls) including the repository ID I obtained from the first call.

As a result, I believe that I must have available both a URL to the CMIS endpoint and a repository name as separate data elements.  When we proposed this to MISMO's Architecture workgroup, there was a lot of pushback saying this is unnecessary.  One comment was "there are millions of messages going across the Internet that use a single URL to retrieve a document. Surely that's the case with any CMIS repository as well."

I don't have the experience to know whether this person is right or not.  Given that I have the right access credentials, can I send a single inquiry to Alfresco's content repository and get back a document stored there?

Any insights this group can give me will be most welcome.

Thanks,
Jim Metzger
Harland Financial Solutions

PS: If Alfresco's API can do this, would you say that the CMIS standard supports this, or that Alfresco extended the standard?  Thanks again.
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Every object in a CMIS repository is accessible by a specific URL. Using the Atom Pub binding, the structure of that URL is repository-specific and not dictated by the spec. Using the Browser binding the structure of that URL is dictated by the spec.

For example, using Alfresco 4.2.e and the Atom Pub binding here is the URL that would download a test text file I have sitting in the root of my repository:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom/content/test1.txt?id=f1f4...

Here is the URL you would use to access the same object using Alfresco 4.2.e and the browser binding (new in CMIS 1.1):
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root?objectId=f1f4dc3d...

So every object has a URL that you can use to get that object.

Now, how did I get to that URL? Clearly, if you know the CMIS object ID ahead of time you can construct it. In my case, I navigated the hierarchy until I found the object I wanted. In the case of navigating the hierarchy I had to make multiple HTTP calls in order to do that.

You point out that CMIS supports multiple repositories. That is true. However Alfresco only supports one. So if you know the repository ID ahead of time you do not have to ask the server for its list of repositories.

Hope that helps,

Jeff
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.