Versions Compared

Key

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

First, we need to create a data source using the instructions given in section Data Source Management. Once a data source is created, follow the instructions below to create a data service using the created data source.

Make sure that the JDBC driver is copied A Carbon data source is a RDBMS or a custom data source created using the Data Sources sub menu of the Configuration menu in the management console. You can simply use that as the data source of a data service. A Carbon data source is persisted, and can be used whenever required. To create a Carbon data source, see Configuring Data Sources.

After creating a Carbon data source, be sure to copy the JDBC driver to:

  • <PRODUCT_HOME>/repository/components/lib directory
  • <PRODUCT_HOME>/repository/components/dropins

For example, cp mysql-connector-java-5.XX-bin.jar /home/user/wso2ds/wso2-dataservices-XX/repository/components/lib.

1. Log on to the product's management console and select   "Data Service -> Create" under the "Main" menu.

Image Removed

2. The "Create Data Service" page appears. Fill in the fields and click "Next." The Data Service name is mandatory.

Image Removed

Info

For more information on advanced configurations, refer to  Advanced Data Service Configurations.

3. The "Data Sources" page appears. Click on the " Add New Data Source" link and add your Data Source details. Then click "Save."

For a Carbon data source, select the data source type as "Carbon Data Source" and then select the data source created earlier as the "Data Source Name". For example,

Image Removed

4. After saving, the added data source page appears with links to edit or delete the Data Source.

Image Removed

To proceed click "Next."

5. You can continue to add Queries, Operations and Resources. Once the Data Service configuration is done, click "Finish."

6. You will be navigated to the "Deployed Services" page .

Image Removed

From here, you can manage your data service. For instructions, refer to section Data Service Management.Next, simply use that data source at the time a data service is created. Follow the steps in Creating Data Sources. When you select Carbon Data Source as the data source type at the time a data source is created, you get a drop-down list from which an existing Carbon data source can be selected. For example:

Image Added