As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom
try { Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters[DotCMIS.SessionParameter.BindingType] = BindingType.AtomPub; //parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/atom"; parameters[DotCMIS.SessionParameter.AtomPubUrl] = "http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.0/atom"; parameters[DotCMIS.SessionParameter.User] = "admin"; parameters[DotCMIS.SessionParameter.Password] = "admin"; //parameters[DotCMIS.SessionParameter.RepositoryId] = "<repositoryId>"; SessionFactory factory = SessionFactory.NewInstance(); IList<IRepository> repos = factory.GetRepositories(parameters); ISession session = repos.ElementAt(0).CreateSession(); IFolder rootFolder = session.GetRootFolder(); foreach (ICmisObject cmisObject in rootFolder.GetChildren()) { Console.WriteLine(cmisObject.Name); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); }
IFolder folder1 = (IFolder)session.GetObjectByPath("/Test");