Defining the REST service
A new service version called Catalog Search is used to initiate the service lifecycle.
About this task
Procedure
- Log in to the dashboard if not already logged in. Optional: If you have security enabled and you have assigned separate user IDs for each of the service management profile roles, as described in Governing an existing service, log in to the dashboard with the user ID that is assigned to the Development role.
- Create a new REST service and associate a REST service interface with the service.
- Ensure that the Overview page is selected.
- In the Actions widget, click Create a REST Service.
- Complete the
Create a REST Service
panel as follows:- In the Name field, enter CatalogSearch.
- In the Description field, enter Service to search a catalog.
- In the Version field, enter 1.0.
- Under the Service Interface heading, click Add REST Service Interface.
- In the Name field, enter c and select CatalogServiceInterface from the auto-suggest list. CatalogServiceInterface is added as a target of the Service Interface relationship. (This is the REST service interface that you created in Defining the REST service interface.)
- Click Finish to save the new REST service. The details are displayed in the Detail widget.
- Create a new service version for the Catalog Search business service that you created in Identifying the business capability provided by a service.
- Switch to the SOA Governance view by selecting it from the drop-down menu in the banner.
Optional: If you have security enabled and have assigned separate user IDs for each of the service management profile roles, as described in Governing an existing service, log in to the dashboard with the user ID that is assigned to the SOA Governance role.
- Select the Overview page.
- In the Search widget, select a search type of Business Capability and click Search. Click Catalog Search in the results to view the Business Service details. The displayed page changes to the Browse page, and the Detail, Navigator, and Activity widgets are updated to show the business service.
- In the Detail widget, click the Add Version link.
- Complete the
Add Version to: Catalog Search
panel as follows:- In the Description field, enter Service to search a catalog for named items within a particular category.
- In the Owner Email field, enter development@jkhle.com. This is the email address of the owner of the Service Version, who is the development lead.
- Click Finish. The newly created version is displayed in the Detail
widget. The service information for the version is displayed within a set of tabs. Notice that a
count of zero is displayed on the label of each tab (other than Overview);
for example, Interface (0). This zero count indicates that no related
interfaces, endpoints, consumers, or consumed services are currently defined for the service version.
Tip: The available tabs and the level of detail on each tab are dependent on the Detail widget settings that are configured by your administrator.
- Switch to the SOA Governance view by selecting it from the drop-down menu in the banner.
- Associate the CatalogSearch (1.0) REST service that you created in step 2 with the newly created
service version of the Catalog Search business service.
- Under the Version section in the Detail widget, click the Action menu and then click Edit Service Version.
- Complete the Edit: Catalog Search panel as follows, to add the REST
service:
- Under the Provided REST Services relationship, click Add REST Service.
- In the Name field, enter * and click Find.
- Select the check box for CatalogSearch (1.0).
- Click Finish.
- Click Finish to save your changes and return to the Detail widget.
- Identify the interface defined by the REST service interface.
- Under the Version section in the Detail widget, click the Action menu and then click Edit Service Version.
- Complete the Edit: Catalog Search panel as follows:
- Click the Interface tab.
- Click Add Service Interface.
- Click the REST Service Interface option.
- In the Name field, enter * and click Find.
- Select the check box for CatalogServiceInterface (1.0) and click Finish.
- Click Finish to save your changes and return to the Detail widget. Notice that the Interface tab now has a count of 1.
- Click the Interface tab to view the details. When you added the REST service interface named CatalogServiceInterface
(1.0), its related SLD (SLD - CatalogServiceInterface) and
attached Swagger document (CatalogSearch.yaml) were also added to the service
version. These details are shown in the Interface tab.
Review the Swagger details by clicking the CatalogSearch.yaml link to open the file in a resizable Swagger document viewer. To close the document viewer and return to the Interface tab, click the Close button.
- View the Catalog Search business service structure that has been defined:
- In the Detail widget, click Action > View in Graphical Explorer. The displayed page changes to the Graph page.
- Review the structure of the service as it is now stored in WSRR.
Results
- Created a new REST service
- Associated the REST service with a REST service interface
- Created a new service version
- Identified the service version defined by the REST service
- Identified the interface defined by the REST service interface
Parent topic: Governing an existing REST service
Previous topic: Defining the REST service interface
Next topic: Defining the REST service endpoints