12-05-2014 07:11 AM
Map<String, String> parameter = new HashMap<String, String>();
parameter.put(SessionParameter.USER, "USR");
parameter.put(SessionParameter.PASSWORD, "PWD");
parameter.put(SessionParameter.ATOMPUB_URL, "http://xxx:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom");
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
List<Repository> repositories = sessionFactory.getRepositories(parameter);
if (repositories != null && !repositories.isEmpty()) {
repo = repositories.get(0);
}
org.apache.chemistry.opencmis.client.api.Session session = repo.createSession();
org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Unexpected document! Received: HTML document
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.parse(AbstractAtomPubService.java:596)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getRepositoriesInternal(AbstractAtomPubService.java:777)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:65)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getRepositoryInfos(RepositoryServiceImpl.java:85)
at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:109)
at org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.getRepositories(SessionFactoryImpl.java:96)
12-05-2014 09:05 AM
12-06-2014 11:26 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.