REST Adapter Trigger Response Page

Enter the REST Adapter response payload details for the endpoint.

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

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.

  • If you upload a schema file without a target namespace, a surrogate namespace is added to the schema file that all messages then use:
    http://xmlns.oracle.com/cloud/adapter/nxsd/surrogate
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.
  • XML Schema

  • JSON Sample: 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 Large Sample JSON File Processing with Special Characters.
  • Sample XML Document (Single or No Namespace): Select this option to use an XML document to generate the schema.
  • Sample JSON Document: Select this option to use a JSON document to generate the schema.
  • Binary: 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.

Select the type of payload with which you want the endpoint to reply (If Binary payload format is selected)

Select from a list of commonly used types provided in the dropdown menu. You can also select Other Media Type to provide a type not listed in the dropdown list—for example, video/mp4.

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.