Defining the REST service

A new service version called Catalog Search is used to initiate the service lifecycle.

About this task

The next steps in registering a new service are to create a REST service, then to associate a REST service interface with the service, and finally to associate the REST service with a service version called Catalog Search that is used to govern that service.

Procedure

  1. 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.
  2. Create a new REST service and associate a REST service interface with the service.
    1. Ensure that the Overview page is selected.
    2. In the Actions widget, click Create a REST Service.
      Create a REST Service link
    3. Complete the Create a REST Service panel as follows:
      1. In the Name field, enter CatalogSearch.
      2. In the Description field, enter Service to search a catalog.
      3. In the Version field, enter 1.0.

        Create a REST Service panel

      4. Under the Service Interface heading, click Add REST Service Interface.

        Add REST Service Interface fields

      5. 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.)

        Service Interface relationship

      6. Click Finish to save the new REST service. The details are displayed in the Detail widget.

        New REST service in Detail widget

    You now have a definition of a REST service that you can use as the realization of a service version.
  3. Create a new service version for the Catalog Search business service that you created in Identifying the business capability provided by a service.
    1. Switch to the SOA Governance view by selecting it from the drop-down menu in the banner.

      SOA Governance view

      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.

    2. Select the Overview page.
    3. 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.

      Updated Detail, Navigator, and Activity widgets

    4. In the Detail widget, click the Add Version link.
    5. Complete the Add Version to: Catalog Search panel as follows:
      1. In the Description field, enter Service to search a catalog for named items within a particular category.
      2. 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.

        Add Version panel

      3. 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.

        New Version details in Detail widget

        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.
  4. 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.
    1. Under the Version section in the Detail widget, click the Action menu and then click Edit Service Version.

      Edit Service Version menu option

    2. Complete the Edit: Catalog Search panel as follows, to add the REST service:
      1. Under the Provided REST Services relationship, click Add REST Service.
      2. In the Name field, enter * and click Find.
      3. Select the check box for CatalogSearch (1.0).

        Add REST service

      4. Click Finish.

        Edit: Catalog Search panel with REST service target

      5. Click Finish to save your changes and return to the Detail widget.
    You now have a definition of a REST service that you can use as the realization of a service version.
  5. Identify the interface defined by the REST service interface.
    1. Under the Version section in the Detail widget, click the Action menu and then click Edit Service Version.

      Edit Service Version menu option

    2. Complete the Edit: Catalog Search panel as follows:
      1. Click the Interface tab.
      2. Click Add Service Interface.
      3. Click the REST Service Interface option.
      4. In the Name field, enter * and click Find.
      5. Select the check box for CatalogServiceInterface (1.0) and click Finish.

        Add a service interface

      6. Click Finish to save your changes and return to the Detail widget. Notice that the Interface tab now has a count of 1.
    3. 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.
      Interface tab with Swagger document link

      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.

      Swagger document viewer

  6. View the Catalog Search business service structure that has been defined:
    1. In the Detail widget, click Action > View in Graphical Explorer. The displayed page changes to the Graph page.
    2. Review the structure of the service as it is now stored in WSRR.

      Catalog Search service structure in the graphical explorer

Results

In this tutorial, you completed the following activities:
  • 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