Data integration is an important part of an integration process. For example, consider the following scenario, where you have a typical integration process that is managed using the ESB profile of WSO2 EI. In this scenario, data stored in various, disparate datasources are required in order to complete the integration use case. The data services functionality that is embedded in the ESB profile allows you to manage this integration scenario by decoupling the data from the datasource layer and exposing them as data services. The main integration flow defined in the ESB will then have the capability of managing the data through the data service. Once the data service is defined, you can manipulate the data stored in the datasources by invoking the relevant operation defined in the data service. For example, you can perform the basic CRUD operations as well as other advanced operations.
The data services feature was previously provided by WSO2 as a separate product (WSO2 Data Services Server). With the introduction of WSO2 EI, you no longer require a separate data services server to manage the datasources required for your integration scenario.
See the following topics for more information:
Elements of a data service
See Elements of a Data Service for detailed information on what constitutes a data service.
Creating a data service
You can create a comprehensive data service in a few simple steps using the management console of the product. There are three ways of creating data services using the ESB profile of WSO2 EI as explained below.
Creating a data service from scratch
The management console of the ESB profile provides a convenient wizard that will guide you to create the service from scratch using a few simple steps. The following diagram depicts the steps you need to follow.
Let's briefly look at each step of the Create New Data Service wizard:
Define the data service: In the first step, you must specify the general details of the data service, such as the name and description of the data service. In addition, you can enable advanced options for your data service such as Namespaces, Batch Requests, Data Streaming, Transport settings and Distributed Transaction settings.
Add Datasources: In the second step, you must specify the details of the datasources that should be exposed by the data service. You can add multiple datasources to the data service to achieve data federation. The parameters that you can configure for a datasource depends on the type of datasource. For example, if you use an RDBMS or Cassandra as the datasource, you can enable OData.
Define Operations: In the fourth step, you can define an operation connected to a single query if you want to expose the data as a SOAP service. The operation will be used to invoke the query.
Expose data as a REST resource: In the next step, you have the option of exposing the data from your data services as REST resources. To do this, you will be defining a resource connected to each query.
Uploading an already created data service (.dbs file)
If you already have a data service created, you can directly upload the .dbs file of the data service using the management console. See Uploading a Created Data Service for instructions.
Generating a data service using a defined database structure
If a database structure is already defined, the data service will be automatically generated for the datasource that you specify. See Generating a Data Service for instructions.
Data integration capabilities in the ESB of WSO2 EI
Given below are the key features of data integration available in WSO2 EI.
- Exposing data as web services
- Exposing data as REST resources
- Processing requests in batches
- Invoking multiple operation simultaneously (request box)
- Exposing data through various transports
- Handling data federation
- Transacitonal data access and services (distirbuted transactions)
- Securing and managing data access
- Using namespaces for data services
- Monitoring data services.