Configuring REST Adapter Response Properties

Enter the REST Adapter response payload details for the endpoint.

What You Can Do from the REST Adapter Response Page

You can configure the following response payload details on the trigger or invoke REST Adapter Response page.

  • Specify attachment processing options.
  • Specify the schema or JSON sample response payload file location.
  • Select the type of payload for the endpoint to receive.

What You See on the REST Adapter Response Page

The following table describes the key information on the REST Adapter Response page.

Element Description

Select the attachment processing options

Configure the following options based on whether the request is inbound or outbound.

For inbound (trigger) responses, select the multipart attachment type to include.

  • Accept attachments from response: Select to receive the response from the payload. This selection refreshes the page to display the Select the type of payload with which you want the endpoint to reply field at the bottom of the page.

  • Response is HTML form: Select for the REST endpoint to accept to configure an HTML form. You must first select the Accept attachments from response option before you can select this option. This selection assumes that the media type is multipart/form-data.

For outbound (invoke) responses, select the multipart attachment type to include.

  • Process attachments from response: Select for the REST endpoint to process attachments from the outbound multipart request. This selection refreshes the page to display the Select the type of payload with which you want the endpoint to reply field at the bottom of the page.

  • Response is HTML form: Select for the REST endpoint to accept to configure an HTML form. You must first select the Process attachments from response option before you can select this option. This selection assumes that the media type is multipart/form-data.

Select the response payload format

Select the response payload format to use. The response payload body must be defined by the XSD element that defines the structure of this representation.

Note: Ensure that the sample JSON or the uploaded XML schema is representative of the actual runtime messages exchanged with the endpoint. A mismatch in the structure or type of runtime messages can result in errors.
  • XML Schema

  • JSON Sample: (Creates a sample JSON file.). Select this option to use Swagger and RAML files. JSON sample files of up to 100 KB in size are supported.

    Empty arrays in JSON sample files are not supported. For information, see Empty Arrays Are Not Supported in Sample JSON Files. You may need to process large JSON sample files with special characters before using the Adapter Endpoint Configuration Wizard. See Processing Large Sample JSON Files with Special Characters.
  • Raw: Use with payloads that are unstructured and inline — for example, application/octet-stream.  It preserves the file contents, but requires the receiver to determine the file type, for example, from the filename extension. The Internet media type for an arbitrary byte stream is application/octet-stream.

Schema Location

Specify the schema file in either of the following ways:

  • Click Browse to select the response schema file to use.

  • Click <<inline>> to copy and paste the JSON payload or URL into a text field. Click OK when complete.

Element

Select the element that defines the payload structure. This field is not displayed until you import the response payload file. Once you browse for and select the schema file, it displays a combination box that selects the root element by default.

Select the type of payload with which you want the endpoint to reply

Select the payload type with which you want the endpoint to reply.
  • XML: Displays the payload in XML format.

  • XML (text): Displays the payload in XML text.

  • JSON: Displays the payload in JavaScript Object Notation (JSON) format.

  • Other Media Type: Select to display the payload in another format (for example, application/oracle.cloud+json). You can only specify media types that end with +json or +xml. The following media types are supported implicitly and cannot be configured. At runtime, the request media type is in the form of an http Content-Type header. The expected response media type is specified through an Accept header. Any service can be accessed through either of these media types.
    • Application/XML

    • Application/JSON

Select the multipart attachment type for the endpoint to receive. This field is displayed if you selected an option in Select the attachment processing options field.
  • multipart/mixed: Send an XML or JSON payload type with an attachment. For example, send a PDF document for review as a link in an email.

  • multipart/form-data: Send an XML or JSON payload type with an attachment. For example, you create an HTML form to upload and send an image. In the HTML form, the method is defined as post and the enctype (encoding type) is defined as multipart/form-data.