I have done little research, found Apache’s library. I written the below code but getting error which is been given in comments. Kindly help if someone encountered the same issue.
// pipeline
Object pdfFileStream =null;
InputStream iStream =null;
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String userName = IDataUtil.getString( pipelineCursor, "Sharepoint.username" );
String password = IDataUtil.getString( pipelineCursor, "Sharepoint.Password" );
String atompub_url = IDataUtil.getString( pipelineCursor, "Sharepoint.URL" );
String documentName = IDataUtil.getString( pipelineCursor, "docname" );
String doc_id = IDataUtil.getString( pipelineCursor, "doc_id" );
SessionFactory factory = SessionFactoryImpl.newInstance();
Map<String, String> parameter = new HashMap<String, String>();
// Specify the connection settings
parameter.put(SessionParameter.USER, userName);
parameter.put(SessionParameter.PASSWORD, password);
parameter.put(SessionParameter.ATOMPUB_URL, atompub_url);
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
parameter.put(SessionParameter.AUTHENTICATION_PROVIDER_CLASS, CmisBindingFactory.NTLM_AUTHENTICATION_PROVIDER);
// Create a session
// List repositories = factory.getRepositories(parameter);
// Session session = repositories.get(0).createSession();
Repository soleRepository = factory.getRepositories(parameter).get(0);
Session session = soleRepository.createSession();
org.apache.chemistry.opencmis.client.api.Document visaDocument = (org.apache.chemistry.opencmis.client.api.Document) session.getObject(session.createObjectId(doc_id)); [b]( this statment is giving error 'org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: One or more of the input parameters to the service method is missing or invalid' ) [/b]