Search code examples
web-servicesalfrescocmis

Use alfresco Content Management from java application


I'm developping a Java EE application and I need to stock content into alfresco repository.

To do that I found 2 ways:

  • Use Java API Webservices.
  • Use alfresco CMIS.

I don't understand the difference between the two methods.

Can anyone please tell me what is the difference between these?


Solution

  • Well, first of all you should take a look to this Overview of Alfresco APIs from which you will discover there are much more ways to interact with the Alfresco repository than the two you mentioned.

    Generally the two ways will do the same since the both use SOAP binding.

    Having said that, as stated in Alfresco CMIS API:

    CMIS (Content Management Interoperability Services) is a vendor-neutral OASIS Web services interface specification that enables interoperability between Enterprise Content Management (ECM) systems. CMIS allows rich information to be shared across Internet protocols in vendor-neutral formats, among document systems, publishers and repositories, in a single enterprise and between companies.

    You can use basic HTTP methods to invoke CMIS methods, or you can use one of the many language-specific libraries that wrap CMIS. One such example for the Java language is the OpenCMIS Client API provided by the Apache Chemistry project. Apache Chemistry provides client libraries for many other languages such as Python, PHP, and .NET.

    According to Java API Web Services have been superceded by CMIS SOAP Binding:

    Please note that this API has been superceded by CMIS (specifically, the CMIS SOAP binding). It's use is no longer recommended. This functionality was removed from Alfresco in 5.0.b. "Please also note that the endpoint for soap web services was moved for alfresco 4.2.d. To make way for the public api." now instead of being http://localhost:8080/alfresco/api the soap services resides at http://localhost:8080/alfresco/soapapi This API was removed in Alfresco 5.0 and is no longer available. Use the CMIS web services bindings instead.

    So if you need to use Web Services to add content to Alfresco repository use the latest Alfresco CMIS API.