Managing REST Services

This chapter discusses how to:

Important! Before you can provide or consume services in a PeopleSoft system, you must configure the system for handling services.

See Also

Configuring PeopleSoft Integration Broker for Handling Services

Click to jump to parent topicUnderstanding Managing REST Services

As non-REST services are used to logically group a set of non-REST service operations, REST services are used to logically group a set of REST service operations.

For example, if you have a number of REST service operations that are related to customers, such as those pertaining to customer information, adding customers, updating customers, deleting customers, and so on, you can create a customer REST service and then associate the related REST service operations with that REST service.

Click to jump to parent topicCommon Elements Used in this Chapter

Comments

(Optional.) Enter comments about the service or service definition.

Description

Description of the service.

Is Provider

This option appears when the service is defined as a REST-based service.

Check the box to define the service as a provider service.

Link Existing Operations

Click to add service operations already defined in the system to a service.

Object Owner ID

(Optional.) Indicates the owner of the service.

The owner ID helps to determine the application team that last made a change to a service definition. The values in the drop-down list box are translate table values that you can define in the OBJECTOWNERID field record.

Operation Type

Specifies how the service is transmitted.

On the Service page this field defines the operation type of the service operation added.

Provide Web Service

Click to launch the Provide Web Services component and export a PeopleSoft REST service as a WADL document.

This link appears only when the service is a provider REST service.

REST Method

Indicates the HTTP method for manipulating REST resources.

REST Service

The service is defined as a REST-based service when this box is checked.

Schema Namespace

Provides qualification for attributes and elements within an XML schema document (XSD).

The default is http://xmlns.oracle.com/Enterprise/Tools/schemas.

The namespace on the message definition defaults to the schema namespace you set as the default on the Service Configuration page.

Note. If you change the namespace, all future messages will have the new namespace.

Service

The name of the service.

Service Alias

(Optional.) Overrides the service name and will be the name of the service when the WSDL is provided or exported. The alias enables you to use mixed case in the name.

Service Operation

The name of the service operation to associate with the service.

On the Services page, use this field to add new service operations for the current service.

Namespace

The namespace field on the Service pages provides qualification for attributes and elements within a WADL document.

The value defined in the Service Namespace field in the Service Configuration page is used as the default service namespace on the Services page. The default value is http://xmln.oracle.com/enterprise/tools/service.

Service System Status

The status that is selected restricts rename, delete, and other administrative actions that users can perform on integration metadata in the Services Administration component.

Values are:

  • Production.

  • Development.

See Understanding Configuring PeopleSoft Integration Broker for Handling Services.

View WADL

Click the link to view WADL documents in the WSDL repository that have been generated for the service

This link appears only when the service you are viewing is a REST-based provider service.

Click to jump to parent topicAccessing and Viewing REST Service Definitions

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicAccessing REST Service Definitions

REST service definitions appear on the Services page (IB_SERVICEDEFN) in the Service component (IB_SERVICEDEFN).

Use the Services-Search page to search for and access REST definitions in the database. The following example shows the Service-Search page:

Note that the Services-Search page features a REST Service check box. To access a REST service in the database you must select the REST Service check box. If you do not select the box, the system searches the database for non-REST services.

After a successful search for a REST service, the system displays the definition in the Services page. The following example shows a REST service definition in Services page:

The top portion of the page features a read-only REST Service box that, when selected, indicates that the service is a REST-based service. The page also features a read-only Provider box that, when selected, indicates the service is a provider service; if the Provider box is clear, the service is a consumer REST service.

To access a REST service definition:

  1. Select PeopleTools, Integration Broker, Integration Setup, Services.

    The Services-Search page appears.

  2. Select the REST Service box.

  3. Use one of the following methods to search for a definition:

    The definition for the selected service appears in the Services page.

Click to jump to top of pageClick to jump to parent topicViewing WADL Documents for REST Services

Click the View WADL link to display the WSDL Repository page (IB_SERVICEDEFN_SEC) and access any generated WADL documents for the service.

The following example shows the WSDL Repository page for the QE_WEATHERSTATION service.

When you click the View WADL link on the WSDL Repository page, the WADL Viewer page (IB_SERVICEWSDL_SEC) appears and you can view the WADL document for the service. The following example shows generated WADL for the QE_WEATHERSTATION service appearing in the WADL Viewer page:

To view a WADL document for a REST service:

  1. Access the service definition. (PeopleTools, Integration Broker, Integration Setup, Services.)

  2. Click the View WADL link.

    The WSDL Repository page appears.

  3. Click the View WADL link.

    The document appears in the WADL Viewer page.

  4. Click the Return button to return to the WSDL Repository page.

  5. Click the Return button again to return to the Services page.

Click to jump to top of pageClick to jump to parent topicViewing REST Service Operation Information

The Existing Service Operations section of the Services page contains an Operation tab that displays service operations and service operation versions that are associated with the service. It also displays descriptions of the service operations, the type of operation, and whether the service operation is active. When you click the name of a service operation, the operation opens on the Service Operations page, where you can view and modify service operations information, work with the service operation handlers, routing definitions, and do much more.

See Also

Managing REST Service Operations

Click to jump to top of pageClick to jump to parent topicView Messages Defined for REST Service Operations

The Existing Service Operations section of the Services page contains a Messages Links tab that displays the request and response messages defined for each REST service operation in the service. The following example shows the Message Links tab displaying request and response messages for the service operations that are associated with the QE_WEATHERSTATION service:

Click the request or response message name to open the message in the Message Definitions page, where you can view and modify message definition information, message schema information, and more.

See Also

Managing Messages

Click to jump to parent topicAdding REST Service Definitions

This section discusses how to add REST service definitions to the PeopleSoft system.

Click to jump to top of pageClick to jump to parent topicUnderstanding Naming Services and Service Aliases for REST Service Definitions

REST service names and REST service alias names can be exposed as REST services. As a result, the following restrictions apply when you name a REST service or a REST service alias. REST service names and REST service alias names:

Click to jump to top of pageClick to jump to parent topicAdding REST Service Definitions

To add a REST service definition to the system, use the Add a New Value link on the Services search page. To access this page, select PeopleTools, Integration Broker, Integration Setup, Services, then select the Add a New Value link.

Note. Before you can add a service, you must configure PeopleSoft Integration Broker to handle services using the Service Configuration page.

See Understanding Configuring PeopleSoft Integration Broker for Handling Services.

Important! To create a REST service you must select the REST Service option when you add the service.

After you add a service definition to the system, the Services page (IB_SERVICEDEFN) appears that you use to configure the service definition. The following example shows the Services page after a REST-based service called DEMO_REST_SERVICE is added to the system. Note that the REST Service box at the top of the page is checked, signifying that the service is REST-based.

To add and configure a REST service definition:

  1. Access the Services page (PeopleTools, Integration Broker, Integration Setup, Services).

  2. Click the Add a New Value link.

  3. In the Service field, enter a name for the service.

    Restrictions for naming services are discussed elsewhere in this section.

    See Understanding Naming Services and Service Aliases for REST Service Definitions.

  4. Check the Rest Service box.

  5. Click the Add button.

    The Services page appears.

  6. In the Description field, enter a description for the service.

  7. (Optional.) Check the Is Provider box to define the service as a provider service.

    By default, when you add a REST-based service to the system it is a provider service.

  8. (Optional.) In the Comments field, enter comments about the service or the service.

  9. (Optional.) In the Service Alias field, enter an alias name for the service.

    Restrictions for naming service aliases are discussed elsewhere in this section.

    See Understanding Naming Services and Service Aliases for REST Service Definitions.

  10. (Optional.) From the Object Owner ID drop-down list box, select the owner of the service.

  11. In the Namespace field, enter a namespace URI for the service.

    The default value is the namespace that is declared in the Service Namespace field on the Service Configuration page.

  12. Click the Save button.

Click to jump to parent topicAdding Service Operations to REST Service Definitions

This section discusses how to:

Click to jump to top of pageClick to jump to parent topicUnderstanding Adding Service Operations to REST Service Definitions

You can add a REST service operation that already exists in the database to a REST service definition, or you can add a new REST service operation to the database.

Click to jump to top of pageClick to jump to parent topicAdding Existing Service Operations to REST Service Definitions

The process for adding existing REST service operations to REST services is identical to the process for adding non-REST services to non-REST service operations.

Important! You can add only those service operations defined as REST service operations to REST service definitions; you cannot add non-REST service operations to REST services and you cannot add REST service operations to non-REST services.

See Adding Existing Service Operations to Service Definitions.

Click to jump to top of pageClick to jump to parent topicAdding New Service Operation Definitions for REST Services

The only way to add a new REST service operation to the database is from a REST service, using the Add button in the Service Operations section of the Services page (IB_SERVICEDEFN).

The type of service, provider or consumer, determines the type of service operation that the system adds. If you are working with a provider service and add a service operation, a provider service operation is added to the service; if you are working with a consumer service and add a service operation, the system adds a consumer service operation.

The following example shows a REST provider service definition:

The Services page features a Service Operations section where you define the service operation name and the REST method. The system automatically appends the service operation name with the name of the selected REST method. This functionality allows you to reuse the service operation name using other method types. The system allows you to enter a service operation name in mixed-cased. The service operation name you enter becomes the default service operation alias.

So for example, if you enter a service operation name of WeatherStation and select the GET method from the REST Method drop-down list, the system names the operation WEATHERSTATION_GET and the service operation alias is WeatherStation.

If a service is defined as a provider service, all service operations you create from the service definition are provider services operations. If a service is defined as a consumer service, all service operations you create from the service definition are consumer service operation.

After you provide a service operation name and a REST method and click the Add button, the new service operation appears in the Service Operations component and you can proceed to configure the operation. The following example shows a new REST service operation called WEATHERSTATION_GET appearing in the Service Operations page:

To add a new service operation for a REST-based service:

  1. Access the Services page (PeopleTools, Integration Broker, Integration Setup, Services).

    The Services page appears.

  2. In the Service Operations section, locate the Service Operation field and enter a name for the new service operation.

  3. From the REST Method drop-down list, select the HTTP method for manipulating the resources defined in the service operation. The valid values are:

    REST methods are defined elsewhere in this PeopleBook.

    See REST Methods.

  4. Click the Add button.

The Service Operations-Definitions page appears. Use the page to configure the service operation.

See Also

Configuring REST Service Operation Definitions

Click to jump to parent topicRestricting and Enabling Write Access to REST Service Definitions

You can restrict write access to a REST service so that sensitive fields of the service definition and of associated service operations appear in read-only mode. Use the Restricted Service page (IB_SVCSETUP3) in the Service Configuration component (IB_SVCSETUP) to restrict a service. Use the process for restricting and enabling write access to non-REST service definition for restricting and enabling write access to REST service definitions.

See Restricting and Enabling Write Access to Service Definitions.

Click to jump to parent topicRenaming and Deleting REST Service Definitions

You can rename and delete services using the Services tab in the Service Administration component (IB_HOME_PAGE). Use the process for renaming and deleting non-REST service definitions for renaming and deleting REST service definitions.

See Renaming and Deleting Service Definitions.

Click to jump to parent topicActivating and Deactivating REST Service Definitions in Bulk

You can activate and deactivate services in bulk using the Service Activate/Deactivate page (IB_HOME_PAGE9) in the Service Administration component. Use the process for activating and deactivating non-REST services in bulk for activating and deactivating REST services in bulk.

See Activating and Deactivating Service Definitions in Bulk.