Preparing Web Service Configurations for Reading Data
The following steps explain how to prepare a web service configuration for reading (exporting) data from RDM tables.
The configuration produces a set of plan files and one .online
file containing the web service configuration.
Step 1 Understand the online export task anatomy
Defining a web service configuration for reading (exporting) data has the following hierarchical structure:
-
Online Task = One
.online
file (one service with a specific URL and predefined endpoint).-
Export = One plan and SOAP action.
-
Table = One Extended Reader step in the plan.
-
-
You can make several tables available for reading data from the same URL location. Each table collection like that has its own SOAP action. In this case, you need to configure the generated plan for each task to define which attributes from each table you want to have available or calculate a custom attribute. See Configuring a plan for reading data.
Step 2 Prepare web service definition in the RDM project
-
Expand Synchronization > Online > Online (exports).
-
Right-click Online (exports) and select New Online task.
-
Specify the service Name.
-
Under Exports, specify the name.
-
Double-click the number next to the export specification to open the details.
-
Configure Authentication Strategy. See App Variables for information about authentication strategies.
-
Under Tables specify which tables are available for consumption:
-
In the Name field, select an existing table.
-
Select History if you want historical records to be available for consumption (via the
timestamp_increment
web service input element). -
Specify which columns should be available for consumption: either select Use All Columns or choose columns manually under Columns.
Note that when Use All Columns is selected, adding and deleting columns in the table in question is reflected in the plans and .online
files generated in the last step of the procedure.
-
-
(Optional) Under Additional output columns, list custom calculated columns, for example, calculate age from the date of birth column. You need to specify the algorithms populating such columns in the generated plan. See Configuring a plan for reading data.
-
Select Apply to save the configuration.
A new configuration appears under Synchronization > Online > Online (exports).
-
Select the left arrow in the upper-right corner of the configuration dialog to go back and add another export under Exports.
-
Repeat steps 4-9 until done with all exports.
-
For each online task, right-click the task and select Generate online file and plan(s).
The
.online
file is generated to Files > onlineServices and all dependent plans are generated into Files > plans > synchronization > onlines > exports.The naming conventions are as follows:
-
Online file:
[task_name]_export.online
, for example,newtask_export.online
. -
Plans:
[task_name]_[export_name]_export.plan
, for example,newtask_PRODUCTS_export.plan
.
-
Step 3 Configure service endpoints
Applies from 14.5.1 and later. |
To authenticate the online services, RDM uses one of the default service clients defined in Keycloak (namely, service-account-rdm-admin-client
).
If you are using a particular role to access the service endpoint, which depends on your authentication setup, the same role must be assigned to the service-account-rdm-admin-client
.
To do this, edit the client’s Service Account Roles in Keycloak to include the necessary roles.
For details, see the official Keycloak documentation.
In addition, in order to have the Keycloak-based authentication applied to these services as well, you need to configure the service endpoints as follows:
-
Expand Synchronization > Online.
-
Right-click Online and select Edit.
-
Specify the following:
-
Online Export Endpoint: Part of the URL where the services are running that comes after the base URL and before the service name. For example, if ONE Runtime Server is available at
localhost:8888
, and the full endpoint islocalhost:8888/rdm/export/service_export
, the prefix isrdm/export
.Default value:
api/rdm
. -
Online Import Endpoint: Part of the URL where the services are running that comes after the base URL and before the service name. For example, if ONE Runtime Server is available at
localhost:8888
, and the full endpoint islocalhost:8888/api/rdm/export/service_export
, the prefix isapi/rdm/export
.Default value:
api/rdm
.Do not set either endpoint to rdm
as it is reserved for internal JWT authentication and cannot be used externally.
-
-
Select OK to save the configuration.
-
Right-click the Online Services node and select Generate all online files and components to refresh the configuration of relevant services.
-
Commit the updated files (typically located in
Files/onlineServices
) to your configuration repository.For further information about deploying online services, see Online Services Component.
Enrichment and validation services rely on internal JWT authentication and therefore no additional changes are required. |
Configuring a plan for reading data
As noted previously, each export under a data-reading task results in a plan file. Typically, generated files do not require modification: the configuration is ready for testing and deployment. However, if you would like to get a custom column set returned, you need to modify the generated plan.
There are two main cases when you need to do this:
-
You want to calculate a special value to a custom column. For example, your data has a date of birth column, but you would also like to have age returned.
-
You want to receive data from different tables and combine them into a custom report. For example, you want to combine the information from the BRANCH table, which contains basic information about bank branches, with the information from the REGION and CITY tables in order to get full information about the branch location.
Was this page useful?