Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Installing BAM Mediator Feature

The following installation instructions apply to WSO2 ESB version 1. Download WSO2 ESB version 4.5.x onwards.1. Download the WSO2 ESB from location: or later from http://wso2.com/products/enterprise-service-bus. Since BAM Mediator Aggregate feature is available by default from ESB 4.6.0 onwards, you do not have to install it separately if you use a newer ESB version.

2. Since both ESB and BAM server will be run concurrently, change the port number of ESB by applying an offset. To apply an offset, navigate to <ESB_HOME>/repository/conf and open file, carbon.xml, where <ESB_HOME> is the WSO2 ESB's product distribution directory. Then change the value in xpath Server/Ports/Offset from 0 to some other integer. For example,

...

  1. Go to ESB management console and select Main→Axis2 Services→List from side panel.
  2. Click on Simple_Stock_Quote_Service_Proxy to go to its dashboard.
  3. Click on Edit link under category, Specific Configuration.
  4. Click on Next> button.
  5. Select option Define Inline under category, Define In Sequence and click on its Create link.
  6. Click on Configuration Registry link, select [Sequence]-fault from the drop down list and click OK button.

  7. Click on Add Child link on the Root, select Agent→BAM from menus.

  8. Select BAM element from the sequence tree and go to the form appeared below.
  9. Select Server Profile from the available set of server profiles in the drop down list.
  10. Select Stream Name from the available set of stream names with the selected BAM server profile in the drop down list.
  11. Select Stream Version from the available set of stream versions with the selected stream name in the drop down list.

  12. Click Update button. You can observe the mediator XML generated for the BAM Mediator by clicking on switch to source view link. You can go back to the design view by clicking on switch to design view link.
    The mediator XML is in the following format. (This is an example.)
    <bam xmlns="http://ws.apache.org/ns/synapse">
       <serverProfile name="profile1">
          <streamConfig name="stream1" version="1.0.0" ></streamConfig>
       </serverProfile>
    </bam>

  13. Add more mediators to the WSDL Proxy Service if required.
  14. Click Save button.
  15. Click Next> button.
  16. Click Finish button. Now the BAM mediator is added to the WSDL Proxy Service, Simple_Stock_Quote_Service_Proxy.

...

  1. As the ESB pack was downloaded and started, downloaded and start the WSO2 BAM without the same port offset as ESB.
  2. In the ESB product directory go to $esb_home/samples/axis2Client
  3. Build the backend service with Apache Ant (You need to install Apache Ant before that.) with the following code.
    ant stockquote -Daddurl=https://localhost:8244/services/Simple_Stock_Quote_Service_Proxy -Dmode=fullquote -Dsymbol=testString
    

    (Here addurl value should be given from the https endpoint located in Simple_Stock_Quote_Service_Proxy's service dashboard that can be navigated by going to the ESB management console Main→Web Services→List Main→Services→List from side panel and selecting Simple_Stock_Quote_Service_Proxy. Any preferred string can be used instead of the testString for symbol


    Now BAM mediator in the proxy service, Simple_Stock_Quote_Service_Proxy should have dumped data extracted from the ESB to the key-space, EVENT_KS in the Cassandra database, with column family name same as the Stream Name. Data in the Cassandra database can be seen from the Cassandra Explorer in the BAM server.