This documentation is for WSO2 Enterprise Integrator version 6.1.1 . 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
Skip to end of metadata
Go to start of metadata

Note that WSO2 EI is shipped with the following changes to what is mentioned in this documentation:

  • <PRODUCT_HOME>/repository/samples/ directory that includes all Data Integration samples is changed to <EI_HOME>/samples/data-services/.
  • <PRODUCT_HOME>/repository/samples/resources/ directory that includes all artifacts related to the Data Integration samples is changed to <EI_HOME>/samples/data-services/resources/.

Relational databases are the most commonly used datasources in data services. The sample named RDBMSSample is used here to demonstrate how we can use an RDBMS datasource with WSO2 Enterprise Integrator (WSO2 EI).

About the sample data service

This sample refers to information from a small company, embedded in an H2 database. It contains information such as employee and customer records and product details. The RDBMSSample contains separate queries/operations written for specific tasks of the company.

The operations implemented in the service are listed below:

  • customersInBoston: Returns all the customers in Boston. This operation is linked to a query, which has the following, simple SQL statement: select * from Customers where city = 'Boston' and country = 'USA'.
  • employeesByNumber: Returns employee details when the employee number is given. This is an example of a data service operation that takes in a parameter. The linked query's SQL statement is written in the following way: select * from Employees where employeeNumber = ?". Note that "?" represents the parameter that is defined in the query.
  • customerAddress: Returns the customer's address when the person's name is given.
  • productsInfo - This operation lists information on all the products that are produced by the company.
  • setEmployeeSalary: Sets the salary of an employee, when the employee number and the revised salary is given.
  • setSalaryForEmployees: Sets the salary for a given set of employees. Here, the usage of "array" data type is demonstrated where the employee number is an INTEGER ARRAY type.
  • incrementEmployeeSalary: Increments employee salary with the given amount.
  • addEmployee: Adds a new employee record with the given information.

Building the sample

Deploy the sample data service named RDBMSSample, using the steps in Samples Setup.

Executing the sample

You can run the sample service using the TryIt tool, which is bundled with WSO2 EI, or a code-generated java client sample as discussed in the Data Services Clients section.

See the topics below for samples on a few important RDBMS features:

  • No labels