Tutorial : Mule Creating a simplest flow using Http and Java component


In this example, we're going to create the simplest Mule app flow. Our flow basically consist of a Http and a Java component which looks like this :-


User basically connects to something like this :- http://localhost:3003/?username=jeremy.

Query parameter called ussername get pass into java's class and returns "jeremy" or "unknow user" depending on the string passed.

Here is what our java class looks like :-




From the code above, our java class implements mule class callable and we attempted to extract username parameter from 'http.query.params' which is a Map object type. With this, we proceed to get our value by calling get Map's method 

Well, that's it. Done! :)







Comments

Popular posts from this blog

OpenCover code coverage for .Net Core

ionic2 cordova build android - Unable resolve gradle 2.2.3

Using Custom DLL with IronPython / Scripts