info@yenlo.com
eng
Menu
WSO2 4 min

Working with connectors and WSO2 Micro Integrator 4.1.0

WSO2 Micro Integrator and its predecessor the Enterprise Integrator 6.6.0 both have the capability to work with something called “connectors”. For those of you who do not know what is meant by a connector, other than it is something used to establish a connection, let me explain.

Rob Blaauboer
Rob Blaauboer
Integration Consultant & WSO2 Trainer
Working with connectors and WSO2 Micro Integrator 4.1.0 2

WSO2 Micro Integrator and its predecessor the Enterprise Integrator 6.6.0 both have the capability to work with something called “connectors”. For those of you who do not know what is meant by a connector, other than it is something used to establish a connection, let me explain.

A connector is a prebuilt set of interfaces for instance to a cloud-based service like Twitter. You can spend a lot of time trying to figure out how you make a connection to Twitter. You look at the documentation and with some serious effort you would be able to integrate Twitter into your IT landscape. A connector does everything for you in the sense that you do not have to reinvent the wheel and create your own connection to Twitter. The connector is prebuilt and will allow all users to make connections to Twitter and use the exposed APIs for integration with your systems.

Connectors are not changing the product; they are extending the product and do not influence the source code of the system. You can simply add or remove them whenever you need. Apart from the cloud-based connectors there are also other types like database connectors that will make a connection to a database and technology connectors, like the file connector which allows you to access local files and files on the network.

A connector file is a zip archive in which you can find synapse configurations, soap services and in some cases even Java packages; provided the kind of connection that you’re trying to establish is impossible to do so, using synapse).

Finding your connector

But where can you find them? The public connectors can be found online. If you click on this link, you can access the connector store and view the various connectors that are available. Not only for the Enterprise Integrator, Micro Integrator but also for the identity server which also uses the concept of connectors in order to extend the product with new functionality.

working with connectors and WSO2 Micro Integrator 4.1.0

As you can see is the connectors are refined by category. If you tick one of these boxes it will show you connectors that are relavent for that area. Another thing that is striking is that a lot of them are developed by WSO2 but some of them have also been developed by third parties like the latest redis connector that has been developed by reddis labs. It’s good to know that you do not need to be a big organization in order to create your own connectors. Later on, I will give you an idea on how to create your own connector and what you can do with it. Now it’s time to dive in a little deeper.

 Let’s take a quick look at one of the connectors, let’s take Twitter. Search for Twitter.

EI connectors when working with connectors

As you can see from the screenshot when we click on the Twitter connector there is already some information that will tell us about the connector. Let’s take a look at what we see here. First of all, we see an icon with the famous Twitter bird. This icon is shown when depicting the connector when you start crafting integration flows using the connector in the WSO2 Integration Studio.

The functionality is exposed just like a mediator or endpoint, therefore these can be dragged and dropped onto the canvas of integration studio. You can also observe the version number in conjunction with the supported product versions in this case it is pointing at an older version of the Enterprise Integrator, namely 6.4.0 and 6.3.0. That doesn’t mean that it would not work with the Micro Integrator. It just means that they haven’t either updated the store or haven’t formally tested it against the new product.

The summary tells you a little bit about what the connector does and as you can see there is the possibility to download the connector after entering your e-mail address and looking at the documentation that is available on the connector. In this case, there is also an associated inbound endpoint referenced, meaning that if you download the inbound endpoint, you can have a Twitter stream as an information stream fed into your Micro Integrator and from there on into your systems in the IT landscape. Let’s download the connector because we want to take a look inside.

enter email to download
twitter connector
connector download

Inside we find a connector.xml that list the dependencies (folders) above. This is replicated in a folder where a component.xml describes the files.

component.xml

The icon directory has the image and the org directory some java classes needed to make this connector work. The other directories house the interface to twitter with the config being a special one. You can read in the documentation on how to work with it.

A custom connector can be created with a maven archetype that creates the basic structure. Here you see it in a Windows command window. OF course, there are prerequisites like Maven that need to be installed.

Maven building connectors

You can then fill in the services that you need in order to create your own connector, for instance it maybe a connection to your own systems. When you are ready, you can do a mvn clean install to build the connector. It creates a zip file that you can deploy in the integrator.

It is good to know that if you created a connector that is useful to more people, you can submit it to WSO2 who will inspect it and if everything is OK, add it to the store.

You will see a link explaining the process, listed in the Connector Store.

connector store

In the next blog we will show you how you add a connector to the Micro Integrator and Integration Studio.

eng
Close