Microsoft One Drive White Paper

EXTENDING
WSO2 ESB
CAPABILITIES
TO ONEDRIVE
Mitra Innovation builds a Microsoft
OneDrive connector
www.mitrai.com
[email protected]
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.
Mitra Innovation, Microsoft OneDrive and
WSO2 ESB
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.
www.mitrai.com
Page 2
“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”
[email protected]
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:
§  Easy to configure – once for each client, or once for all clients that subscribe
§  The 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.
www.mitrai.com
Page 3
[email protected]
The image below provides an overview of the solution we developed:
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
(h0ps://dev.onedrive.com/). www.mitrai.com
Page 4
[email protected]
The following is a sample API configuration that makes use of the connector
methods to search for documents in a given folder.
www.mitrai.com
Page 5
[email protected]
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 [email protected] (or
visit our website at www.mitrai.com). We’d be happy to help.
Mitra Innovation and WSO2
Mitra Innovation is a Preferred Partner of
WSO2 as 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 all organisations with WSO2
guidance, support and integration work,
wherever necessary.
www.mitrai.com
Page 5
“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).”
[email protected]
WOULD YOU
LIKE TO
KNOW MORE?
Get in touch today!
www.mitrai.com
[email protected]
Tel: 0208 090 4121
Mitra Innovation helps smart entrepreneurs, enterprises and public
service organisations to accelerate innovative ideas into amazing
global businesses or solutions, through product incubation,
systems integration, and digital transformation services. Think Innovation, Incubation, Integration >> THINK MITRA
Office locations:
§  London
§  Ipswich
§  Colombo
§  Moratuwa