AnsweredAssumed Answered

Problems connecting to a CMIS AtomPub Endpoint

Question asked by dhiogocorrea on Sep 4, 2014
Latest reply on Jul 7, 2016 by sravan.kadaveru

I'm new using Alfresco and CMIS, and I'm having some problems. I tried and searched a lot and couldn't fix it. I'm using Alfresco Community 3.2r and DotCmis 0.6. I'm using it in the port 8082.
I'm trying to run this code on Visual Studio 2008:

private ISession Alfresco_Authentication()
            Dictionary<string, string> parameters = new Dictionary<string, string>();

            parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub;
            parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8082/alfresco/service/api/cmis";
            parameters[DotCMIS.SessionParameter.User] = "admin";
            parameters[DotCMIS.SessionParameter.Password] = "admin";

            SessionFactory factory = SessionFactory.NewInstance();
            IList<IRepository> repos = factory.GetRepositories(parameters);
            ISession session = repos.ElementAt(0).CreateSession();

            return session;

I get the exception "<b>ArgumentOutOfRangeException was unhandled</b>" in the line: ISession session = repos.ElementAt(0).CreateSession();

Its seens like there is no repositories at all (repos.Count is zero after the GetRepositories stuff).

I also tried to change the AtomPubUrl to:
"http://localhost:8082/alfresco/service/cmis" - Getting the CmisObjectNotFoundException - Not Found
"http://localhost:8082/alfresco/cmis" - Getting the CmisObjectNotFoundException - Parsing exception!

Some other curious things:
-I tried to use the WebServices Binding Type, but inside "http://localhost:8082/alfresco/cmis", I don't have the AclService available.
-The url ""http://localhost:8082/alfresco/service/cmis" doesn't connect, i get the error message:
The Web Script /alfresco/s/cmis has responded with a status of 404 - Not Found.

404 Description:   Requested resource is not available.

Message:   08040020 Script url /cmis does not map to a Web Script.
Exception:   org.alfresco.web.scripts.WebScriptException - 08040020 Script url /cmis does not map to a Web Script.

Please help me. It's driving me crazy!