create folder in microsoft office 365 share point using mule esb

13
www.sanjeetpandey.com www.sanjeetpandey.com Prepared by – Sanjeet Pandey Create Folder in Microsoft SharePoint using Mule ESB

Upload: sanjeet-pandey

Post on 10-Aug-2015

138 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

www.sanjeetpandey.com

Prepared by – Sanjeet Pandey

Create Folder in Microsoft SharePoint using Mule ESB

Page 2: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Overview

MuleSoft provides the most widely used integration platform to connect any application, data service or an API, across the cloud and on-premise continuum. Microsoft Office-365 SharePoint is a cloud-based Content management infrastructure that is accessible to the user programmatically via a MuleSoft ‘Microsoft Service Bus’ connector. SharePoint Online is a cloud-based service that helps organizations share and collaborate with colleagues, partners, and customers. With SharePoint Online, you can access internal sites, documents, and other information from anywhere—at the office, at home, or from a mobile device. The Microsoft SharePoint Mule connector allows developers to access any amount of data, at any time and from anywhere on the web. With connectivity to the Microsoft SharePoint API, users can interface SharePoint to perform CRUD operations on documents and use data with other SharePoint services. Applications can also be built for which internet storage is required - all from within MuleSoft Anypoint Platform..

Supported operations:• Lists and List Items API: Create, delete, retrieve, and update lists and list items.• Files and Folders API:

– Files: Add, retrieve content, retrieve metadata, delete, check out, undo check out, check in, publish, unpublish, approve, deny, recycle, and copy files.

– Folders: Create, delete, and retrieve folders.

2

Page 3: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Authentication

• The Microsoft SharePoint connector supports different authentication schemes based on whichMicrosoft SharePoint that you access:

• Supported Microsoft SharePoint authentication on-premise:– NTLM– Claims-based authentication

• Supported Microsoft SharePoint authentication online:– Claims-based authentication

• Unsupported authentication: Kerberos

3

Page 4: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Prerequisites

• Microsoft Office-365 SharePoint Account• Microsoft Office-365 SharePoint Host , User Name and Password• Mule Anypoint Microsoft SharePoint 2013 Connector

4

Page 5: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Installation

To complete this sample, we need an MS Office-365 SharePoint account. We can sign up for a free trial.

5

Page 6: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Mule Connector

Step 1 SharePoint connector• SharePoint is a web application platform for

content and document management, intranet portals, collaboration, extranets, websites, and enterprise search. Mule SharePoint connector enables integrating with SharePoint and provides following methods -

• CRUD for Documents• CRUD for Document Library• CRUD for Users

6

Page 7: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Mule MS SharePoint Connector

Step 2: Configure the Global Element

• To configure:• In Anypoint Studio, click File > New > Mule Project.• Specify a Project Name and click Finish.• Click the Global Elements tab.• Click Create.• In the Search text box, type sharepont.• Click Microsoft SharePoint and click OK.• Choose the Global Type to configure:

7

Page 8: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Mule MS SharePoint Connector

Step 3: Configure the Global Element

Fill in the Username, Password, and Site URL.

• For authentication:– To connect to SharePoint

Online, leave NTLM and Claims inputs empty. Just specify a Username, Password, and Site URL.

• Click Test Connection to ensure the connection works correctly:

8

Page 9: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Mule flow

• Install the Microsoft SharePoint Connector in Anypoint Studio (3.5 and above) http://repository.mulesoft.org/connectors/releases/3.5

• Create a new Anypoint Studio Project and Flow.• Before using the Microsoft SharePoint Connector in the Mule Flows, create a global element

for ‘Microsoft_SharePoint_2013__Online_Connection’ configuration which can be reused in all other flows across the Mule project - wherever the objects are created & deleted to and from Microsoft SharePoint.

• Configure the ‘Microsoft SharePoint’ connector by providing the following information for the global element– User Name– Password– Site Url

9

Page 10: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Mule flow (Cont ..)

• Use HTTP inbound endpoint to hit the service and to crteate folder in the Microsoft Office-365 SharePoint.

• Configure the Microsoft SharePoint endpoint by providing the following to create folder in the SharePoint document library -– Link to the ‘global

Connector Configuration’

– Operation name

10

Page 11: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Running Mule Project

• We are now ready to run the project! First, let us test run the application from Studio:• Right-click on the application in the Package Explorer pane.• Select Run As > Mule Application:• Start a browser and go to http://localhost:8081/createFolder• The success response should be returned in case of successfully creation of folder under

SharePoint document library.

11

Page 12: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com

Running Mule Project (Cont…)

• Folder creation under MS SharePoint -

12

Page 13: Create folder in microsoft office 365 share point using mule esb

www.sanjeetpandey.com 13