You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Nicolas Raoul <ni...@gmail.com> on 2010/06/04 11:20:36 UTC
OpenCMIS Client: Is REPOSITORY_ID really needed?
Hello all,
When creating an OpenCMIS client session, why do I need to provide the
repository id?
>From the code sample at https://cwiki.apache.org/CMIS/opencmis-client-api.html :
parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
If I comment out this line, OpenCMIS returns an exception "Repository
Id is not set".
OpenCMIS could automatically find this repository id (for instance by
sending a request to ATOMPUB_URL and reading the value in the
repositoryid tag).
Is there any reason why it does not?
Thanks a lot!
Nicolas Raoul
RE: OpenCMIS Client: Is REPOSITORY_ID really needed?
Posted by Florian Müller <fm...@opentext.com>.
Hi Nicolas,
There can be more than one repository per endpoint. OpenCMIS has to know which one it should use.
If you don't know the repository id you could use SessionFactory.getRepositories() [1] instead of SessionFactory.createSession().
getRepositories() returns a list of all repositories at this endpoint and provides a createSession() operation for each of them.
- Florian
[1] http://incubator.apache.org/chemistry/javadoc/org/apache/chemistry/opencmis/client/api/SessionFactory.html#createSession%28java.util.Map%29
-----Original Message-----
From: Nicolas Raoul [mailto:nicolas.raoul.lists@gmail.com]
Sent: Freitag, 4. Juni 2010 11:21
To: chemistry-dev@incubator.apache.org
Subject: OpenCMIS Client: Is REPOSITORY_ID really needed?
Hello all,
When creating an OpenCMIS client session, why do I need to provide the
repository id?
>From the code sample at https://cwiki.apache.org/CMIS/opencmis-client-api.html :
parameter.put(SessionParameter.REPOSITORY_ID, "myRepository");
If I comment out this line, OpenCMIS returns an exception "Repository
Id is not set".
OpenCMIS could automatically find this repository id (for instance by
sending a request to ATOMPUB_URL and reading the value in the
repositoryid tag).
Is there any reason why it does not?
Thanks a lot!
Nicolas Raoul