mitrai-wso2-esb-banner

EXTENDING WSO2 ESB CAPABILITIES TO ONEDRIVE

Mitra Innovation builds a Microsoft OneDrive connector

The beauty of OneDrive

Microsoft OneDrive has come a long way since its launch as Windows Live Folders with the code name ‘SkyDrive’ in 2007. Its technology has steadily been improved upon for over a decade, allowing it to evolve into one of the leading file hosting services. Today, OneDrive offers a wealth of powerful features and apps for more platforms than any of its competitors.

One of the key factors of OneDrive is its interoperability with various web services,and Microsoft’s introduction of OneDrive APIs has enabled developers to develop web services and client apps, harnessing OneDrive’s cloud storage. The API’s include a Software Development Kit (SDK) for .NET, Android, IOS and a RESTFul services layer for applications. This SDK empowers client applications to use a versatile, cloud based file hosting system which allows users of these web services and client apps to browse, view, upload or edit files stored on OneDrive.

Microsoft OneDrive and WSO2 ESB

Ondrive

“The API includes a SDK for .NET, Androd, IOS and a RESTFul services layer for applications. This empowers client applications to use a versatile, cloud based file hosting system”

Recently, one of our customers required a file management solution in a cloud based environment. They wanted to use Microsoft OneDrive as the file hosting environment, in order to leverage their existing OneDrive business account.

Our client already had WSO2 ESB deployed and configured, and this served as their integration backbone. As their solution provider – and an expert in WSO2 technologies – we wanted to avoid creating additional development overheads by implementing a WSO2 ESB connector solution that does not need the (proprietary) OneDrive API implementation for their applications.

Connectors

When it comes to WSO2 ESB, the most well-known method of connecting to third party services is through ‘connectors’. The WSO2 store provides a wide range of connectors, however, at this particular point in time, a Microsoft OneDrive connector wasn’t available. As innovation is the lifeblood and competitive advantage of our business at Mitra Innovation, we decided to build the connector ourselves, in order to meet our client’s needs.

Our approach when developing the OneDrive connector

When developing the OneDrive connector, we wanted to create something that would allow our client – and future users – to connect seamlessly to their OneDrive, without having to implement the tedious tasks of authenticating or authorising access each time OneDrive is accessed.

In addition, we had to ensure that every connector that is already implemented, or will be implemented will perform the following tasks:

● Easily configured – once for each client or once for all clients that subscribe
● Ability to be extended or modified easily in cases of updates to OneDrive API.

While keeping the basic design considerations in mind, we also requested the following capabilities of the API to be exposed via the WSO2 ESB:

● To upload documents to the specified folder of the OneDrive instance
● To search for documents inside a particular folder
● To download documents providing its name.

The image below provides an overview of the solution we developed:

Ondrive-digram

For each of the requests, the WSO2 ESB generates the access token and authorisation based on the configuration information provided in the ‘init’ method of the connector. The configuration (‘init’ method) expects the following information:

● Application / Client id
● Client secret
● Authorisation code.

Please refer to the OneDrive API docs for more information on how to use the API.

The following is a sample API configuration that makes use of the connector methods to search for documents in a given folder.

Ondrive-code-mitrai

Outcome

Mitra Innovation has been very successful in developing the OneDrive Connector for WSO2 ESB, and not only have we offered great value to our customer whilst solving their problem, but we have also shared our solution by donating it back to the WSO2 ESB OpenSource community.

If you’re looking for a good WSO2 ESB connector for Microsoft OneDrive, we hope you’ve found this document, and our development work, useful. We hope to share more connectors in the future.

If you need support integrating the OneDrive connector or to develop connectors to other proprietary systems, please get in touch with us at innovate@mitrai.com (or visit our website at www.mitrai.com). We’d be happy to help.

 

Mitra Innovation and WSO2

Enterprise-Integration-Simplified-small

“We recommend the use of WSO2 middleware because it is a 100% open source platform which spans the entire length and breadth of service orientated architecture (SOA)”

Mitra Innovation is a Preferred Partner of WSO2 due to the fact that we are well versed in various WSO2 technologies, and we have developed our business to incorporate these skills. We believe that entrepreneurs and enterprises should capitalise on WSO2 middleware capabilities in order to launch new ventures or implement great ideas faster and cheaper. We are happy to provide guidance, support and integrations.

Download Whitepaper


Your Name (required)

Company (required)

Your Email (required)

Phone