chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Kr Gupta <>
Subject Not able to access SharePoint List using OpenCMIS(Java) ..however able to acces Sharepoint Library
Date Thu, 05 Jul 2012 14:47:36 GMT
Hi All, 
This is Vijay. I am trying to fetch the data from SharePoint Library and SharePoint List using
apache Chemisty OpenCMIS(Java) . 
I am able to fetch the properties and documents from a SharePoint library but I am not able
to fetch the properties from a 
SP List. Here properties mean, the columns name of a SP List and this List does not contains
any file/document. 
So can you please help me out if OpenCMIS provides support to access the SP List and if yes,
how I can access it.
I have written following code to access the SPList and SPLibrary:
 SessionFactory factory = SessionFactoryImpl.newInstance();
        Map<String, String> parameter = new HashMap<String, String>();   

        parameter.put(SessionParameter.USER, "UserId");
        parameter.put(SessionParameter.PASSWORD, "Password");
        parameter.put(SessionParameter.AUTHENTICATION_PROVIDER_CLASS, CmisBindingFactory.NTLM_AUTHENTICATION_PROVIDER);
        // connection settings
        parameter.put(SessionParameter.BINDING_TYPE, BindingType.WEBSERVICES.value());
        parameter.put(SessionParameter.WEBSERVICES_ACL_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_DISCOVERY_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_MULTIFILING_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_NAVIGATION_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_OBJECT_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_POLICY_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_RELATIONSHIP_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_REPOSITORY_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
        parameter.put(SessionParameter.WEBSERVICES_VERSIONING_SERVICE, "http://hostserver/_vti_bin/CMISSoapwsdl.aspx");
  parameter.put(SessionParameter.REPOSITORY_ID, "3F083606-91A5-435F-B8E3-3F94938AC9A1");
// SP Library ID
    Session session = factory.createSession(parameter);

  ItemIterable<ObjectType> types = session.getTypeChildren(null, true);
        for (ObjectType type : types)
            String docType = type.getId().toString();        
            System.out.println("type display name: " + type.getDisplayName());
            //if ("cmis:document".equalsIgnoreCase(docType)){
             Map<String, PropertyDefinition<?>> props = type.getPropertyDefinitions();
             for (PropertyDefinition<?> prop : props.values())
                 System.out.println("  id  : " + prop.getId());
                 System.out.println("  display name: " + prop.getDisplayName());
           // }
 Above code is able to fetch the properties of a SP Library but if I replace the REPOSITORY_ID
by a SP List Id, the code is not 
 able to fetch the properties(column names and their values)
 Please suggest a way through which I can access the SP List properties also.
 This is very crucial requirement for our projects and any help is highly appreciated.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message