WSO2 ESB Walk-through – S̶h̶o̶r̶t̶e̶s̶t̶ Smartest Path

WSO2 Enterprise Service Bus is a lightweight, free and open source product with 100+ ready-made connectors [1], which is being used by well known enterprises including eBay [2]. It’s 100% configuration driven and all the configuration can be done via the administration interface, without any code level changes. WSO2 ESB has a neatly arranged set of documents making lives easier for users, administrators as well as developers.

This post intends to provide a guide or a walk through in familiarizing with WSO2 ESB by bringing together videos, links, samples as well as documentation in to one place and in a sequence best suits a software engineer to understand and use WSO2 ESB (though same will apply to other users). Post will be in point notation and will be in form of instructions to follow in order to easily learn about WSO2 ESB.

Getting Started

WSO2 Official Tutorial

  • Go through lesson one of tutorial :\
  • Go through lesson two of tutorial :
    • In step 1 and 2, sample is getting built and Axis2 instance is being started which is totally separate from WSO2 ESB (relevant scripts do not change any ESB configuration or will not deploy anything to ESB).
    • In step 3 a SOAP client is being executed calling actual Axis2 service hosted in http://localhost:9000/services/SimpleStockQuoteService but through transport URL http://localhost:8280 (which is the WSO2 ESB instance). Therefore, here the client is calling a external web service via WSO2 ESB instance.
    • Above service is not registered with WSO2 ESB. Hence, ESB will handle relevant service request and response using the default “main” sequence.
    • Go through WSO2 ESB main sequence configuration available at “Sequences” section of “Service Bus”.
      • ESB1
    • Switch to code view of the sequence and check how mediators has been configured in synapse XML.
    • Execute the SOAP client once again and check WSO2 ESB log (in console itself or file) how log mediator has captured the request and how WSO2 ESB has executed the main sequence according to configuration.
      • [2015-12-01 13:00:00,424] DEBUG – LogMediator Start : Log mediator
        [2015-12-01 13:00:00,424]  INFO – LogMediator To:, WSAction: , SOAPAction: , ReplyTo:, MessageID: urn:uuid:3e4b3de9-a130-467e-884a-e6a3826100de, Direction: response
        [2015-12-01 13:00:00,425] DEBUG – LogMediator End : Log mediator
  • Go through lesson 3 of tutorial
    • In step 4, it is possible to directly provide a original WSDL generated by Axis2 for stock quote service which should be available at http://localhost:9000/services/SimpleStockQuoteService?wsdl
    • In step 12, before adding “send” mediator, add a “log” mediator so that it is possible to see how ESB handles service requests using log files.
    • After completion of lesson 3, WSO2 ESB will generate an secondary WSDL with endpoint references (EPR) changes, so that service clients will communicate with actual Axis2 service through ESB. (clients stubs should be generated using new WSDL which is available at http://localhost:8280/services/StockQuoteProxy?wsdl ).
    • Compare original WSDL available at http://localhost:9000/services/SimpleStockQuoteService?wsdl with ESB generated WSDL available at http://localhost:8280/services/StockQuoteProxy?wsdl and make note of how endpoint references has changed in “wsdl:service” tag of WSDL.
    • Execute client as mentioned in last section of lesson 3 and check WSO2 ESB log files see log mediator in action.
    • Go through lesson 4 of tutorial

WSO2 ESB Tips and Trick with Official Documentation and Samples

Note than these posts are written based on WSO2 ESB 2.x.x. Some of the work flows and screens has changed over time. Please check accordingly. If there is any problem with steps, write back in comments.

To be continued (sample and scenario integration is ongoing)

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">