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:[email protected]] 
Sent: Freitag, 4. Juni 2010 11:21
To: [email protected]
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

Reply via email to