Alfresco OpenCMIS - How to get ServiceRegistry from Session?
I am using chemistry-opencmis-1.1.0.
My understanding is, we first create Session and from Session, we get the ServiceRegistry.
However, when I look at the org.apache.chemistry.opencmis.client.api.Session, I do not see any method called getServiceRegistry. Should I import a different package of Session, which will have the method called getServiceRegistry?
How should we get the serviceRegistry? (This application is not an android mobile app, just a regular Java class).
Re: Alfresco OpenCMIS - How to get ServiceRegistry from Session?
You are using a remote API, OpenCMIS, to access an Alfresco repository. As such, you should not expect to be able to get the Alfresco Service Registry, which is only available to code running in the local repository.
If you need to be able to call methods on the beans that are in the Alfresco Service Registry, you should be running your code in the local Alfresco process, like in a web script, an action, or a behavior.
If you want your code to run remotely, and do all the things that CMIS can do, you'll have to rely on what CMIS provides. If there are gaps, you can supplement those gaps by making calls to the Alfresco 5.2 Public REST API or to custom web scripts from your remote code.
Examples of Java OpenCMIS code-For a site (e.g. HelloSite), from docLibrary, get doc byte & metadata
I saw your post (Java-OpenCMIS code example) in the past but I cannot locate it. Can you please direct me to that website?
I have a site (e.g. HelloSite) and in the docLibrary of that site, I have multiple folders and at the bottom-most folder, I have a few documents. I need to get the bytes and metadata of these documents. I will have to call in a recursive manner, which I can code. I have successfully coded it using Java-backed web service, but I need to code it Java Session/Open-CMIS API.
Can you please refer me to your site (code examples) where you have the Java-OpenCMIS code example of using Session, Sessionfactory, getRootFolder, getChildren, etc API?