Hi,
I developed an interface to Alfresco Community Edition using CMIS 1.1 API which worked fine.
Recently our company upgraded the Alfresco Server to version 6.2 (not sure from which version) and now any call on the org.apache.chemistry.opencmis.client.api.Session object throws this error: org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Bad request
I discussed with our Alfresco administrator and there is no error in alfresco.log when this event happens.
My code is something like:
SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
Map<String, String> parameters = new HashMap<String, String>();
parameters.put(SessionParameter.USER, "<user>");
parameters.put(SessionParameter.PASSWORD, "<pwd>");
// Connection settings.
parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
parameters.put(SessionParameter.ATOMPUB_URL, "https://<ALFRESCO HOST>/alfresco/api/-default-/public/cmis/versions/1.1/atom");
parameters.put(SessionParameter.AUTH_HTTP_BASIC, "true");
parameters.put(SessionParameter.COOKIES, "true");
// Create session.
// Alfresco only provides one repository.
Repository repository = sessionFactory.getRepositories(parameters).get(0);
Session session = repository.createSession();
Folder root = session.getRootFolder(); // throws ....CmisInvalidArgumentException: Bad request
The session object seems to be created, but I get the error mentioned above whichever call I try to execute on the session object (i.e. list or upload).
Thanks