Operations with share point

Hi All,
First of all I would like to say thank You for reading my post.

Did someone get a chance to connect to sharePoint from webMethods and perform operations like upload, search,download, delete,…

Kindly let me know if someone has done this task. I have some requirement to do above operations so need inputs.

Thanks,
RP.

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]

My intention is to delete the file using document ID ( considering already documents exist in sharepoint and having a unique document id for each file ).

Thanks,
RP.

Looks like a good deal :slight_smile: I have not worked like this before.

Did you find and explore if you have any SharePoint adapters available in webMethods?

And also can you do this using Webservices?

Mahesh - Thanks for your reply.

There is no such adapter service to make use of. Also I am not sure about the webServices.

@Others : Kindly help if someone already worked on it.

Thanks,
RP

Try to compile the program step wise, find out which step is giving this error, see the syntax of that particular function so that you will understand signature of the function and accordingly you can pass the parameters to make use of functionality. Share the API if you have which will helpful to others as well.

Thanks,

share point offers Rest API. did you try exploring rest API? you can consume rest services in webMethods.

Thanks for your inputs … I fixed it eventually.

Thanks,
RP.

RP,
Can you share the code it will be very helpful. Thnx

I am sorry,it is client specific, I can’t share this to out.

Thanks,
RP.

Ok Thanks…

Mahesh - OpenCMIS is an open API. You can download, implement the API as per your need.

Thanks,

Thanks for your information.

@ All,

FYI - For integration with Sharepoint, you can use webMethods SharePoint Adapter or webMethods CMIS Adapter released as part of wM 9.12 October 2016 release.

You can perform basic create, read, update, and delete (CRUD) operations by using the Representational State Transfer (REST) interface provided by SharePoint. The REST interface exposes all the SharePoint entities and operations that are available in the other SharePoint client APIs. One advantage of using REST is that you don’t have to add references to any SharePoint libraries or client assemblies. Instead, you make HTTP requests to the appropriate endpoints to retrieve or update SharePoint entities, such as webs, lists, and list items.
To know more about Microsoft Share Point, you can visit: Apps4Rent
I hope this helps!
Ben Martin