I was once a student too and I had to learn the intricacies of the products as well. Over the years, I have come to know the products quite well. But I still don’t know everything. In this blog, I would like to give you some guidance on how to get started with WSO2 Enterprise Integrator.
WSO2 Enterprise Integrator Training
Let’s assume that you have been student in one of our trainings. So, you had a couple of days of explanation and experience with WSO2 Enterprise Integrator and developer studio. You are able to do the labs, probably made some typos here and there, but in general everything worked as it should work.
How do you advance your knowledge and experience with WSO2? Working with the product of course will give you a lot of experience and I believe that within a limited amount of time you will be able to create your own proxies and APIs. Apart from working with the product in your day-to-day routine, there is also another way to get more experience with WSO2 Enterprise Integrator.
And that way is actually just playing around with it. For instance, take a look at a blog of me and then create your own version of it to further develop your skills. This will force you to spend more effort in the creation because you cannot simply copy the stuff that I created. Your example will be different from mine and therefore the parameters, the variables and all of the other stuff will be different as well. The result of course is that you will have more effort to make it work but the rewards are bigger as well because you’re creating something on your own rather than typing it in.
I do not have a backend service!
Recently someone said: “I do not have any backend services that I can use. The services that we have as an organization are just too complex and I would have to set up a separate environment in able to use them”.
Luckily, we have the Internet where many services can be found and used in your set up. It might take some searching to find a good service, especially SOAP services are a little bit harder to find, but in general you should be able to find suitable services or APIs.
Sometimes you don’t even have to go online. Take for instance the echo service that is bundled with WSO2 Enterprise Integrator. This is a very simple service that really echoes the message that you sent to it. Is one of the services that I use a lot in blogs and even training material because it’s always there and it’s easy to use. If you want something a little bit more complex, why not use the Data Services capability that WSO2 Enterprise Integrator has to retrieve information from a database.
Mockaroo
A service that I use a lot is Mockaroo. It is a freemium service that will allow you to create a CSV file or even a database with random “real” data. Why do I say real in combination with random? Well, when you for instance want to have a database of cars the data are actually existing car brands like Ford, Volkswagen and Mazda. The same is true for the other data that they have.
It is a great tool to work with because the data looks real which makes playing around with it more fun. The only drawback is that in the free version you are limited to a thousand records. For $50 per year however you can have hundred thousand records for each download. So, we now have a database with “real” data. If you want to do a quick set up, export data as a SQL file including table creation and create a table with the records in your favorite RDBMS. Then use Enterprise Integrator’s Data Services capability to create a data source making the connection to the database and then generate a simple insert and select service. There you have it you now have a SOAP service that will return a number of records from a database as a SOAP message.
Wiremock
Another tool that is great to use when experimenting with Enterprise Integrator is Wiremock. This Java-based mock service can run on your local computer and will do exactly as you tell it to. Do you want to have the service respond in 32 seconds after invocation? Just to find the delay parameter is 32,000 ms and you’re done. Want the server to return the HTTP code 418 (I’m a teapot)?
Create something like the example above and you are done! You will find a ‘How to do that’ online at Wiremock or in this Yenlo blog about error handling in WSO2 ESB with Wiremock.
I do not know what to do!
I can imagine that you might be in the situation that you don’t know where to start. When you look at the functionality of Enterprise Integrator there are however some simple starting points. The payload factory mediator is the simplest mediator for changing the format of a message. It supports both XML and JSON and is therefore quite suited to play around with. Another nice example is the throttle mediator that will allow you to determine the number of invocations within a specific timeframe. The simple structure of on except and on reject allow you to define the two paths and again play around with it a little bit. Why not try in the on the reject to write the message to an in-memory message store? Why in memory? Because it’s the simplest to configure. It is literally just naming the message store and it’s available for use. Of course, you can also use ActiveMQ or another message broker if you so desire.
XPATH
XPATH is to XML what SQL is to a database. It is a language that we use extensively in Enterprise Integrator to select and manipulate data. However, like SQL there is a bit of a learning curve. Luckily there are tools that will help you test your XPATH statements like the great tools from freeformatter.com. I use it all the time when I’m developing APIs and proxies and need to have a custom express statement.
Perseverance
Now you know some of the tools the that you can use in order to experiment with the WSO2 Enterprise Integrator. There are of course more tools than this but with these you can get started.
In order to learn to work with WSO2 Enterprise Integrator and developer studio you need to put in some effort and of course persevere. It is not uncommon to spend a couple of hours on something that looks very, very simple. The time you spent on that is not time that is lost. It is all part of getting to learn a great new environment to work with.
Interested to join a WSO2 Enterprise Integrator training? Click here for more information about our WSO2 Trainings.