I was using the openCMIS libraries to access the CMIS services in a RESTful style. However, it does not seem to be working. See below. I am not sure as to where the problem could be as on now. It could be either on the openCMIS side or the DCTM-CMIS side. Basically, the ws call seems to go through as the server returns a response. But, the client side (ie openCMIS) somehow fails to represent it back to the caller layer.
java src code
-------------
sessFact = SessionFactoryImpl.newInstance();
System.out.println("SessionFactory : f = "+sessFact);
parameter = new HashMap<String, String>();
// user credentials
parameter.put(SessionParameter.USER, "shatadal");
parameter.put(SessionParameter.PASSWORD, "shatadal123");
// connection settings
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
parameter.put(SessionParameter.REPOSITORY_ID, "");
parameter.put(SessionParameter.ATOMPUB_URL, bsaeURL+"/resources/repositories/"+reposId);
// create session
sess = sessFact.createSession(parameter);
RepositoryInfo reposInfo = sess.getRepositoryInfo();
java console output
---------------------
PLUS
SessionFactory : f = org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl@1b9240e
Sep 8, 2010 2:37:39 PM org.apache.chemistry.opencmis.client.runtime.PersistentSessionImpl <init>
INFO: Session Parameters: {org.apache.chemistry.opencmis.binding.spi.type=atompub, org.apache.chemistry.opencmis.user=shatadal, org.apache.chemistry.opencmis.binding.atompub.url=http://localhost:7080/emc-cmis-ea/resources/repositories/lexecmtrain, org.apache.chemistry.opencmis.session.repository.id=, org.apache.chemistry.opencmis.password=shatadal123}
Sep 8, 2010 2:37:39 PM org.apache.chemistry.opencmis.client.runtime.PersistentSessionImpl <init>
INFO: Session Locale: en_US
Sep 8, 2010 2:37:39 PM org.apache.chemistry.opencmis.client.runtime.PersistentSessionImpl <init>
INFO: Session Cache Size: 1000
Th = Repository not found!
org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Repository not found!
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfo(RepositoryServiceImpl.java:92)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfo(RepositoryServiceImpl.java:69)
at org.apache.chemistry.opencmis.client.runtime.PersistentSessionImpl.connect(PersistentSessionImpl.java:673)
at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.createSession(SessionFactoryImpl.java:86)
at com.lexmark.poc.cmis.CommonUtil.getRESTSession(CommonUtil.java:130)
at com.lexmark.poc.cmis.GenericTestClass.testRESTBasedBinding(GenericTestClass.java:54)
at com.lexmark.poc.cmis.GenericTestClass.main(GenericTestClass.java:40)
sniffer client request
-------------------------
GET /emc-cmis-ea/resources/repositories/lexecmtrain?repositoryId= HTTP/1.1
Authorization: Basic c2hhdGFkYWw6c2hhdGFkYWwxMjM=
User-Agent: Java/1.6.0_21
Host: dlxkrecm08.lex.lexmark.com:7080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
sniffer server response
--------------------------
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: private, no-transform, max-age=3600
Content-Type: application/atomsvc+xml;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 08 Sep 2010 08:58:00 GMT
<..........the whole xml as attached........>