This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Managing Data Integration Artifacts via Tooling

The following sections describe how to use WSO2 EI Tooling to create artifacts for data integration. 

The following section describes how to use WSO2 EI Tooling to add multiple data services to a single Data Service project.

Creating a data service project

  1. You can either use the link on the dashboard (click Developer Studio -> Open Dashboard) as shown below or use the File-> New -> Other -> Data Service Project option.


     
  2. On the window that appears, specify a project name. 


     
  3. If you want to customize the Maven options (such as including parent POM information in the file from another project in this workspace), click Next and specify the options.
  4. Click Finish.

Creating a data service

A data service provides a Web service interface to access data that is stored in relational databases, CSV files, Microsoft Excel sheets, Google spreadsheets, and more. You can create a new data service or import an existing data service from a data service descriptor (DBS) file.  

Creating a new data service

Follow these steps to create a new data service. Alternatively, you can import an existing data service.

  1. You can either use the Data Service Project link on the dashboard (click Developer Studio -> Open Dashboard) or right-click on the Data Service project and click New -> Data Service. 
  2. Select Create New Data Service and click Next.
  3. Type unique names for the project and data service.
  4. Optionally, specify the service group, namespace, description, location, and working set for this data service.
  5. Click Next and specify a unique ID for the data source.
  6. Specify the type of data source you are creating, and then configure the properties that appear for that type. For details on configuring various data source types, see the data integration tutorials.
  7. A Maven POM file will be generated automatically for this project. If you want to customize the Maven options (such as including parent POM information in the file from another project in this workspace), click Next and specify the options.
  8. Click Finish. The data service is created, and the data service is open in the editor. You can now right-click the data service in the outline and add queries, operations, additional data sources, and so on, or click the Source view to add components using XML.  

Importing a data service

Follow these steps to import an existing data service from a data service descriptor (DBS) file. Alternatively, you can create a new data service.

  1. You can either use the Data Service link on the dashboard (click Developer Studio -> Open Dashboard) or right-click on the Data Service project and click New -> Data Service. 
  2. Select Import Data Service and click Next.
  3. Specify the data service descriptor (DBS) file by typing its full pathname or clicking Browse and navigating to the file.
  4. Optionally specify the location and working sets for this project. 
  5. A Maven POM file will be generated automatically for this project. If you want to customize the Maven options (such as including parent POM information in the file from another project in this workspace), click Next and specify the options.
  6. Click Finish. The data service is created, and the data service is open in the editor. You can now right-click the data service in the outline and add queries, operations, additional data sources, and so on, or click the Source view to add components using XML.

Enabling security for a data service

WSO2 supports WS-Security, WS-Policy and WS-Security Policy specifications and these specifications define a behavioral model for Web services. These policies are stored in the local registry of your server.

To locate the security policies stored in the product registry:

  1. Log in to the product's management console and click Registry -> Browse in the Main tab.
  2. Navigate to the _system/config/repository/components/org.wso2.carbon.security.mgt/policy folder shown below. See that the available security policies are listed as security scenarios. 
  3. Click on the required security policy scenario and you will see the registry path to that policy as shown below.

To enable a security policy for a data service:

  1. Open your data service in Developer Studio as explained in the Creating a new data service section given above. You can either create a new data service or import an existing DBS file.
  2. Add the registry path to the required security policy as shown below.
  3. Save the changes.

Adding multiple data services

It is possible to add multiple data services to a Data Service project by following the steps described above. The project structure will be as follows:

 

Creating a custom validator

An input validator allows a data service to validate the input parameters in a request and stop the execution of the request if the input doesn’t meet the required criteria. In addition to the default validators provided by Data Service Server, you can create your own custom validators by creating a Java class that implements the org.wso2.carbon.dataservices.core.validation.Validator interface. You can create a new custom validator or import an existing validator project.  

Creating a new custom validator

Follow these steps to create a new custom validator. Alternatively, you can import an existing validator project.

  1. You can either use the Data Services Validator Project link on the dashboard (click Developer Studio -> Open Dashboard) or click File-> New -> Other -> Data Services Validator Project option. 
  2. Select Create New Data Services Validator Project and click Next.
  3. Type a unique name for the project and specify the package and class name for this validator.
  4. Optionally, specify the location and working set for this project.
  5. A Maven POM file will be generated automatically for this project. If you want to customize the Maven options (such as including parent POM information in the file from another project in this workspace), click Next and specify the options.
  6. Click Finish. The project is created, and the new validator class is open in the editor, where you can add your validation logic.  

Importing a validator project

Follow these steps to import an existing custom validator project. Alternatively, you can create a new custom validator.

  1. You can either use the Data Services Validator Project link on the dashboard (click Developer Studio -> Open Dashboard) or click File-> New -> Other -> Data Services Validator Project option. 
  2. Select Import Project From Workspace and click Next.
  3. Select the existing validator project, and optionally specify the location and working sets for the new project. 
  4. A Maven POM file will be generated automatically for this project. If you want to customize the Maven options (such as including parent POM information in the file from another project in this workspace), click Next and specify the options.
  5. Click Finish. The project is imported, and the validator class is open in the editor, where you can modify the validation logic as needed.