This documentation is for WSO2 Enterprise Integrator version 6.0.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc

Versions Compared


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


  • Update email configurations: Open the axis2_client.xml file from xml file from the <EI_HOME>/conf/axis2 folder and add the following XML element:

    Code Block
    <transportSender name="mailto"
     <parameter name="mail.smtp.from"></parameter>
     <parameter name="mail.smtp.user">esb.sample</parameter>
     <parameter name="mail.smtp.password">esb*sample8</parameter>
     <parameter name=""></parameter>
     <parameter name="mail.smtp.port">587</parameter>
     <parameter name="mail.smtp.starttls.enable">true</parameter>
     <parameter name="mail.smtp.auth">true</parameter>
  • Set up a datasource:

    1. Install the MySQL server.
    2. Download the JDBC driver for MySQL from here and copy it to your to your <EI_HOME>/lib directory.

    3. Create the following database: Company

    4. Create the ACCOUNT table in the Company database:

      Code Block
      CREATE TABLE ACCOUNT(AccountID int NOT NULL,Branch varchar(255) NOT NULL, AccountNumber varchar(255),AccountType ENUM('CURRENT', 'SAVINGS') NOT NULL,Balance FLOAT,ModifiedDate DATE,PRIMARY KEY (AccountID));
    5. Enter the following data into the ACCOUNT table:

      Code Block
      INSERT INTO ACCOUNT VALUES (1,"AOB","A00012","CURRENT",231221,'2014-12-02');


  1. Log into the management console of the ESB of WSO2 EI and EI and click Create under  in the Data Service menu.
  2. Add a name for the data service and go to the next step.
  3. Connect to the Company database that you defined above.
    1. Enter the URL to your MySQL database in the URL field:  jdbc:mysql://localhost:3306/Company

    2. Enter the username and password to connect to your MySQL database. By default the username is root and the password is blank. 

  4. Click Next to go to the Queries screen.
  5. Click Add New Query to specify the query details:
    1. Enter updateAccBalanceQEnter UpdateAccBalance as the query ID.

    2. Enter the following SQL dialect:

      Code Block
      UPDATE ACCOUNT SET Balance=:Balance WHERE AccountID=:AccountID
  6. Click Generate Input Mapping to automatically generate input mappings for the AccountID and Balance fields.
    Image RemovedImage Added
  7. At the bottom of the page you will find the the Events section section:
    Image Modified

  8. Click Click Manage Events and  and add a new event as shown below:
    Image RemovedImage Added 

    The fields in the the Add Events screen  screen are explained below.

    1. Event Idaccount_balance_low_trigger


      The ID used for identifying the event-trigger used in data services queries.

    2. Xpath/updateAccountBalanceQUpdateAccBalance/Balance<200


      Represents an XPath expression that is run against the XML message presented. That is,the request/response message. When this evaluation returns returns true, the event is triggered. 

    3. Target Topicproduct_stock_low_topic


      The topic to which the event notifications are published. 

    4. Event Sink 


      A subscription can be any endpoint that is complaint compliant with WS-Eventing. For example, you can use an SMTP transport to send a message to a mail inbox, where an email address is given as the subscription. Here, many subscriptions can be defined for the given topic.

  9. Save the event.

  10. Save the UpdateAccBalance query.
  11. Create an operation for the updateAccountBalanceQ query.the UpdateAccBalance query as shown below.
    Image Added

  12. Save the Operation.

  13. Click Finish to navigate to the Deployed Services window from where you can manage data services.