1.57 REST Operation Binding Dialog

Use to configure resource URLs, HTTP verbs, and request-response details for the Representational State Transfer (REST) binding operation.

The REST Operation Binding dialog is arranged in the following sections:

Resource and HTTP Verb

The Resource and HTTP Verb section enables you to manage the resource URL and HTTP verb for the selected REST binding operation.

Element Description

Method

Displays the WSDL operation name that is being mapped. In most cases, you can specify a name that is used in the generated WSDL.

Resource

Select an existing URL resource path from the list or click the Add icon to add a new resource path.

The selected resource path is added to the URI Parameters table of the Request section at the bottom of this dialog. If the selected resource contains a template variable, such as {var}, the variable is added to the URI parameters.

HTTP Verb

Select the operation to perform (for example, GET, PATCH, PUT, POST, DELETE).

When you pick a schema for the request, actions are taken based on the verb. URI parameters are added if the verb does not have a payload (GET, DELETE). The URI Parameters table is populated with mappings from the incoming REST query parameters to the WSDL schema. The PATCH verb is used to partially update a resource, and the PUT verb is used to replace resource entirely.

The HTTP verb for the operation is also added to the Operation Bindings section of the Create REST Binding dialog.

Description

Enter an optional description.

Request

The Request section enables you to manage request details for the REST operation.

Element Description

Request

Displays the operation request details.

Schema URL

Displays the schema being used.

Browse for Schema file icon

Select to browse for an existing schema file. This icon is only displayed if you have not yet selected the schema to use.

Define Schema for Native Format icon

Select to invoke the Native Format Builder wizard to create a new native schema file from the following types:

  • JSON interchange format

  • XML sample

  • URL-encoded name

  • URI sample

This icon is only displayed if you have not yet selected the schema to use.

Element

Displays the schema element being used.

Payload

Displays the format of the request payload.

XML

Select to display the payload in XML format. This is the default selection.

JSON

Select to display the payload in JavaScript Object Notation (JSON) format.

URL-Encoded

Select to display the payload in URL-encoded format.

No Payload

Select if there is no payload.

Generate Sample Payload

Select to display the request input for the operation in the Generate Sample Payload dialog.

URI Parameters

Displays the mapping from the REST query parameters to the WSDL schema. This section is automatically populated when a schema is specified (depending on the verb) in the HTTP Verb list.

Generate sample URL for operation

Click to display the sample URL for the operation.

Add parameter

Click to manually add a parameter. In the Style column, click a specific row to invoke a list that enables you to select query or template. In the Expression column, click a specific row to invoke the Expression Builder dialog for adding an XPath expression function.

Delete

Click to delete a selected mapping.

Parameter

Displays the resource selected from the Resource list.

Style

Select the type of variable for the operation:

  • template: If selected, the parameter name must match with the name in the resource path (for example, if orderID is the parameter name, it must appear as part of the resource path). Template variables are typically used for POST and PUT operations.

  • query: Query parameters are typically used for GET and Delete operations.

Type

Displays the parameter type (for example, string or integer).

Default Value

Displays the default value.

Expression

Displays the XPath expression.

Response

The Response section enables you to manage response details for the REST operation. You can have multiple responses. You can create one success response and map other responses to WSDL faults. On the inbound side, when a fault is generated, if you have mapped the response code to a fault in the REST binding, the binding maps the fault to the corresponding HTTP status code. On the outbound side, if an external service returns a particular response code that you have configured, that code is mapped to the corresponding fault in the WSDL and a fault is raised. For example, if you issue a GET request to /Orders/OrderID and that ID is not there, you can map that fault to a 404 error response.

Element Description

Response

Displays the operation response details.

HTTP Statuses

Displays the HTTP statuses. The status are separated by a space (for example 200 201 202).

Payload

Displays the format of the response payload.

XML

Select to display the payload in XML format. This is the default selection.

JSON

Select to display the payload in JSON format.

No Payload

Select if there is no payload.

Generate Sample Payload

Select to display the response output for the operation in the Generate Sample Payload dialog.

Schema URL

Displays the schema being used.

Browse for Schema file icon

Select to browse for an existing schema file. This icon is displayed if you have not yet selected the schema to use. This icon is not displayed for environments in which you cannot change the schema (the WSDL already exists).

Define Schema for Native Format icon

Select to invoke the Native Format Builder wizard to create a new native schema file from the following types:

  • JSON interchange format

  • XML sample

  • URL-encoded name

  • URI sample

This icon is displayed if you have not yet selected the schema to use and in environments in which the WSDL does not already exist.

Element

Displays the element being used.

Fault Bindings

Displays the response fault name, status, type, and schema.

If fault details are defined in the WSDL file, a fault binding is automatically created to this section. You can also manually define fault bindings.

Add icon

Click to add a fault.

Edit icon

Click to edit a selected fault.

Delete icon

Click to delete a selected fault.

Related Topics

Integrating REST Operations in SOA Composite Applications in Developing SOA Applications with Oracle SOA Suite