AnsweredAssumed Answered

Connecting to CMIS using authentication ticket

Question asked by alfred on Jun 9, 2011
Latest reply on Jun 10, 2011 by fmui
Hey there

Well, here's the question : How can I connect to the cmis services using an authentication ticket.
I searched for an answer, and I found here http://issues.alfresco.com/jira/browse/ALF-7074 ,that :
Ticket can be specified in password, if any of the following are true:
a) username is not specified (i.e. null, or length of zero)
b) username is equal to "ROLE_TICKET" (case insensitive)
The CMIS REST API has also been updated to support the above, so it's consistent with Web Services.

this is dated from 4 months ago.

I'm using Opencmis 0.3.0, passing the informations as specified
SessionFactory factory= SessionFactoryImpl.newInstance();
      Map<String, String> parameter = new HashMap<String, String>();
      parameter.put(SessionParameter.USER,"");
      parameter.put(SessionParameter.PASSWORD,theTicket);
      parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
      parameter.put(SessionParameter.ATOMPUB_URL,"URLToService/cmis");
      parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, "URLToService/cmis/services/NavigationService?wsdl");
      parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, "URLToService/cmis/services/ObjectService?wsdl");
, but it returns me this :
org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Parsing exception!
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:465)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:653)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:58)
   at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85)
   at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:69)

I'm using Alfresco 3.4b

Can you tell me what is wrong?

Thanks a lot

Outcomes