When the REST service has been defined, the next step is
to indicate where the service is available by defining REST service
endpoints for the different environments.
Before you begin
For this tutorial the service must already exist in both the
Staging and Production environments and a REST Service Endpoint will
be created for each of these environments.
Procedure
- Optional: If you have security enabled and
have assigned separate user IDs for each of the governance enablement
profile roles, as described in Governing an existing service, log
in to the WSRR web user interface with the user ID that is assigned
to the Operations role.
- In the web user interface, switch to the Operations perspective
by selecting Operations from the Perspective list.
- Create a new REST service endpoint for the Staging environment.
- Click .
- In the Name field, enter http://CSStagingHost:9081/services/catalog/.
- In the Description field, enter Service
Endpoint for Catalog Service on the Staging system.
- In the Version field, enter 1.0.
- In the Base URL field, enter http://CSStagingHost:9081/services/catalog/,
which is the root of the URL of the endpoint that services the collection
of REST resources represented by the Catalog search service.
- In the Service Namespace field,
enter http://commonServices.org/.
- In the Endpoint Type field, enter REST.
- In the Service Name field, enter Catalog
Search.
- In the Service Version field,
enter 1.0.
- Click Finish to save the new
REST service endpoint.
- Add the Staging environment classification to the endpoint.
- Click Edit Classifications.
- Expand .
- Select the check box for Staging,
and click Add. The Staging
classification is added to the Classification list.
- Click OK to assign the classification.
- Add the visibility classification to the endpoint. Because this is an existing service in the Staging environment,
it has an internal endpoint; this classification declares the endpoint.
- Click Edit Classifications.
- Expand .
- Select the check box for Internal and
click Add. The Internal classification is added
to the Classification list. In this example,
the Staging host is an internal system for testers rather than for
general consumers.
- Click OK to assign the classification.
- Activate the endpoint. Because this is an existing
service in the Staging environment it is already being used, so you
must activate the description of the endpoint to reflect this.
- Click Approve for Use. The endpoint governance state changes to Online.
- Create a new REST service endpoint for the Production environment.
- Click .
- In the Name field, enter http://CSProductionHost:9443/services/catalog/.
- In the Description field, enter Service
Endpoint for Catalog Service on the Production system.
- In the Version field, enter 1.0.
- In the Base URL field, enter http://CSProductionHost:9443/services/catalog/ which
is the root of the URL of the endpoint that services the collection
of REST resources represented by the Catalog search service.
- In the Service Namespace field,
enter http://commonServices.org/.
- In the Endpoint Type field, enter REST.
- In the Service Name field, enter Catalog
Search.
- In the Service Version field,
enter 1.0.
- Click Finish to save the new
REST service endpoint.
- Add the Production environment classification to the endpoint.
- Click Edit Classifications.
- Expand .
- Select the check box for Production, and click Add. The Production classification is added to the Classification list.
- Click OK to assign the classification.
- Add the visibility classification to the endpoint. Because this is an existing service in the Production environment,
it has an external endpoint; this classification declares this endpoint.
- Click Edit Classifications.
- Expand .
- Select the check box for External and click Add.
The External classification is added to the Classification list.
- Click OK to assign the classification.
- Activate the endpoint. Because this is an existing
service in the Production environment it is already being used, so
you must activate the description of the endpoint to reflect this.
- Click Approve for Use. The endpoint
governance state changes to Online.
You now have two definitions of a REST service endpoint
for the Catalog service; one for each of the environments. You must
associate these endpoints with the REST service that it is representing.
- Associate the REST Service Endpoints with the REST Service.
- In the web user interface, switch to the Development
perspective if necessary, by selecting Development from
the Perspective list.
- Select .
- Select CatalogSearch from the
collections view.
- Click Edit Relationships to add
the new REST endpoints.
- Click Add REST Service Endpoint under
Add Relationship in the details view for this REST service.
- In the Name field under Search
for Existing Entity, enter *.
- Click Search.
- Select the check box for http://CSProductionHost:9443/services/catalog/
and http://CSStagingHost:9081/services/catalog/
- Click Apply Selected Targets.
- Click Finish to save the REST
service.
Results
In this tutorial, you completed the following activities:
- Created a new REST service endpoint for each environment.
- Classified the new REST service endpoints for environment and
visibility
- Activated the endpoints
- Associated the new service endpoints with a REST service.