Accessing Service Locator operations via REST
The Service Locator REST Service component provides a way to access the Service Locator operations using REST calls, to:
-
Register an endpoint for a specific service on the Service Locator server,
-
Unregister an endpoint for a specific service from the Service Locator server,
To access the Service Locator instance operations via REST, the Service Locator will need to be extended by installing an additional proxy service component in the Talend Runtime Container. To do so, follow the below steps:
-
Type feature:install tesb-locator-rest-service in the Talend Runtime Container to enable the REST Service Locator component.
-
Type feature:install tesb-zookeeper-server in the Talend Runtime Container to enable the Service Locator server (zookeeper server) component.
-
Type list in the Talend Runtime Container. You should see the output:
ID State Blueprint Spring Level Name [ 190] [Active ] [ ] [ ] [ 60] Locator Service :: Common () [ 191] [Active ] [ ] [ ] [ 60] Locator Service :: REST Service () [ 192] [Active ] [ ] [ ] [ 60] ZooKeeper server control bundle (1.2)
The above output shows that the Service Locator REST Service component and Service Locator server (ZooKeeper server) are enabled in the Talend Runtime Container.
The Service Locator server (Zookeeper server) configuration is the same as described in Accessing Service Locator operations via SOAP.
To check that the service is working, access its WADL in a browser at: http://localhost:8040/services/ServiceLocatorRestService?_wadl&_type=xml
The WADL file for the Service Locator REST Service can be found at: add-ons/locator/LocatorService.wadl
The corresponding schema files with definitions of types are:
-
add-ons/locator/locator-common-types.xsd
-
add-ons/locator/locator-rest-types.xsd
-
add-ons/locator/ws-addr.xsd