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

kaynezhang
World-Class Innovator
World-Class Innovator
atom binding url

CMIS 1.0
For Alfresco 3.x : http://[host]:[port]/alfresco/service/cmis
For Alfresco 4.0.x and Alfresco 4.1.x : http://[host]:[port]/alfresco/cmisatom
For Alfresco 4.2: http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.0/atom
CMIS 1.1
For Alfresco 4.2: http://[host]:[port]/alfresco/api/-default-/public/cmis/versions/1.1/atom

Thanks for the reply kaynezhang.

But unfortunately, as I said, I've tried the link for Alfresco 3.x http://[host]:[port]/alfresco/service/cmis and I've got the exception "CmisObjectNotFoundException - Not Found" . The link doesn't work either, getting the error described in the first post. Smiley Sad

esr89
Champ in-the-making
Champ in-the-making
Hi

I'm using DotCMIS 0.7 and I have using http://[server]:[port]/alfresco/api/-default-/public/cmis/versions/1.1/atom to call the method GetObjectByPath(rootFolder) but I get the exception "Property 'cm:categories' doesn't exist!"

I hope that you can help me

Thank you very much

kaynezhang
World-Class Innovator
World-Class Innovator
Have you tried webservice binding instead of atom binding ?

I tried, but it seems like there is no AclService available (look printscreen attached). So when I add all services, this one is missing…

kaynezhang
World-Class Innovator
World-Class Innovator
It seems only version after  3.3 with provide full support for CMIS 1.0 ,maybe your edition 3.2r dose not support cmis 1.0 very well..
Can't you try to upgrade your alfresco?

dhiogocorrea
Champ in-the-making
Champ in-the-making
I thought that the version could be a problem Smiley Sad The problem is that we already have tons of data in Alfresco. But yes, maybe upgrade is the only way…

esr89
Champ in-the-making
Champ in-the-making
Sorry! I have question more up !

vishnuverma
Champ in-the-making
Champ in-the-making
I am not able to find out atom binding url for alfresco 5.1.e.
Please Help me…..
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.