官术网_书友最值得收藏!

  • WSO2 Developer’s Guide
  • Fidel Prieto Estrada Ramón Garrido Lázaro
  • 395字
  • 2021-07-08 10:05:57

Data Service Project

Data Service Project will be used to add data services that allow us to access multiple data sources and expose their data in a very simple way. To create this kind of project, we will start from the Developer Studio dashboard, as usual, and follow these steps:

  1. Click on Data Service Project and add the name and location of the project.
  2. Click on Next and enter the Maven information for the project, that is, Group Id, Artifact Id, and Version. If needed, we can specify the parent project as well, and then click on Finish:
  1. Now, we have added the new data service project to the workspace:

Now, we can create the data services needed for our application.

To add a new data service, go to the Developer Studio dashboard and click on Data Service.

Then, follow these steps:

  1. Choose Create a New Data Service and click on Next.
  2. In this step, we will introduce some general information related to the service:
    • Data Service Name*: This is the desired name.
    • Data Service Group: This is a name for a group, if we would like to group some data services. This is not mandatory and hence we leave it blank.
    • Data Service Namespace: This specifies the namespace for our service.
    • Description: We can add a description here.
    • Save Data Service in: The Data Service Project where we can locate the data service.
  1. Click on Next. Now, we will add the data source information for our data service. There are many ways to create data sources, but according to our experience, the best practice is to create the data sources in the WSO2EI and create references from data services. This way, we can have just one point of data source configuration that provides many advantages. Thus, we will add the following information:
    • Data Source Id: This is a name for the datasource.
    • Data Source Type: As we discussed earlier, we choose Carbon Data Source here, which means that we reference a data source already created in the system.
    • Data Source Name: This is the name of the data source we are referencing.
  1. Click on Finish and the data service will be added:

We can start building our data service by double-clicking on the file. We are now done with the data service edition, and we will go deeper into it in the later chapters.

主站蜘蛛池模板: 桐柏县| 武城县| 朔州市| 舒城县| 外汇| 苍梧县| 东至县| 福泉市| 岱山县| 永宁县| 奉贤区| 信丰县| 高邑县| 依安县| 五常市| 梅州市| 炉霍县| 丁青县| 青海省| 财经| 精河县| 肥乡县| 孟连| 化隆| 尖扎县| 昭平县| 北辰区| 无极县| 贡山| 泽库县| 连州市| 上饶市| 敖汉旗| 岢岚县| 麻栗坡县| 大竹县| 禹州市| 石狮市| 盐池县| 化州市| 库伦旗|