cancel
Showing results for 
Search instead for 
Did you mean: 

Problems connecting to a CMIS AtomPub Endpoint

dhiogocorrea
Champ in-the-making
Champ in-the-making
Hello,

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:

<blockcode>
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;
        }
</blockcode>

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:
<blockcode>
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.
   
   org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:129)
   org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   java.lang.Thread.run(Thread.java:722)
</blockcode>

Please help me. It's driving me crazy!

Thanks!


10 REPLIES 10
Getting started

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.