任何人都可以告诉我使用DotCMIS dll查看露天的所有工作空间的步骤是什么?
答案 0 :(得分:3)
在CMIS中,没有工作空间的概念。我想你的意思是你要列出存储库。为实现这一目标,如official examples所示,您可以执行以下操作:
//
// AtomPub version
//
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters[SessionParameter.BindingType] = BindingType.AtomPub;
parameters[SessionParameter.AtomPubUrl] = "http://your.host.name/alfresco/service/cmis";
parameters[SessionParameter.User] = "admin";
parameters[SessionParameter.Password] = "admin";
SessionFactory factory = SessionFactory.NewInstance();
IList<IRepository> repos = factory.GetRepositories(parameters);
//
// WebServices version
//
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters[SessionParameter.BindingType] = BindingType.WebServices;
parameters[SessionParameter.WebServicesRepositoryService] = "http://your.host.name/alfresco/cmis/RepositoryService?wsdl";
parameters[SessionParameter.WebServicesAclService] = "http://your.host.name/alfresco/cmis/AclService?wsdl";
parameters[SessionParameter.WebServicesDiscoveryService] = "http://your.host.name/alfresco/cmis/DiscoveryService?wsdl";
parameters[SessionParameter.WebServicesMultifilingService] = "http://your.host.name/alfresco/cmis/MultifilingService?wsdl";
parameters[SessionParameter.WebServicesNavigationService] = "http://your.host.name/alfresco/cmis/NavigationService?wsdl";
parameters[SessionParameter.WebServicesObjectService] = "http://your.host.name/alfresco/cmis/ObjectService?wsdl";
parameters[SessionParameter.WebServicesPolicyService] = "http://your.host.name/alfresco/cmis/PolicyService?wsdl";
parameters[SessionParameter.WebServicesRelationshipService] = "http://your.host.name/alfresco/cmis/RelationshipService?wsdl";
parameters[SessionParameter.WebServicesVersioningService] = "http://your.host.name/alfresco/cmis/VersioningService?wsdl";
parameters[SessionParameter.User] = "admin";
parameters[SessionParameter.Password] = "admin";
SessionFactory factory = SessionFactory.NewInstance();
IList<IRepository> repos = factory.GetRepositories(parameters);