REST Requests in soapUI
A REST Request in soapUI correspond roughly to a Method in WADL; it defines an HTTP call to
the containing Resource with settings for HTTP Method, Parameters, Message Content, Attachments, Representations, etc.
Requests are created either directly when creating Resources via the "Create Request" option in the "New Resource"
dialog, or alternatively from the "New Request" Resource popup which prompts for an initial name, HTTP Method and
if to open the request editor:

soapUI has built in support for visualizing both JSON and XML responses, and also internally converts HTML and JSON
responses to XML so they can be used in functional tests together with other related features (property-transfers,
xpath assertions, etc).
Properties and Actions
A REST Request has the following properties at the bottom left when selected in the Navigator:
- Name - the name of the Request
- Description - a description for the Request
- Method - the HTTP Method to use
- Encoding - the encoding for the message body (if PUT or POST)
- Endpoint - the target endpoint for the request
- Bind Address - the local ip-address to bind to when sending the request
- Follow Redirects - option to follow HTTP Redirect response returned by the target server
- Username - Username to use in HTTP Authentication challenges
- Password - Password to use in HTTP Authentication challenges
- Domain - Domain to use in HTTP Authentication challenges
- SSL Keystore - Alternative client keystore to use, must be defined in project WSS certificates tab
- Strip Whitespaces - Option to strip outgoing XML message content of whitespace
- Remove Empty Content- Option to remove empty elements from outgoing message content
- Entitize Properties - Entitize property values expanded in outgoing message content
- Pretty Print - Pretty print response XML
- Dump File - Local file to which the response should be written
The following actions are available from the REST Request popup:
- Show Request Editor - opens request editor described below
- Add to TestCase - prompts to add this REST Request to a TestCase as a REST RequestStep
- Clone Request - prompts to clone the Request
- Rename - prompts to rename the Request
- Delete - prompts to delete the Request
- Online Help - shows this page in a browser
REST Request Editor
The REST Request editor is opened by double-clicking a REST Request or selecting the corresponding
popup menu item:

The editor shares much of its concepts with the WSDL Request editor:
- Request/Response areas to the left and right with corresponding editors (vertical tabs) and
inspectors (tabs at the bottom of the editors).
- A top toolbar for submitting and configuring the request endpoint
Many of the inspectors are the same as for WSDL Requests and will not be covered here in any detail.
The top toolbar has two levels of which the second contains the following left-to-right options:
- Method - a drop-down selecting the HTTP Method to use. If POST or PUT are selected,
a corresponding Message Content editor area is shown below the Parameters table in the root Request
tab (see below).
- Accept - a drop-down for selecting the desired accept-encoding. This will be pre-populated
with the mediaTypes defined by all response representations for the request
- Full path - a label with tooltip showing the actual endpoint URL that would be used
for the request.
The default Request editor has a Parameters table as described previously for defining
parameters and their values. If POST or PUT has been chosen as method, a message-body area is made
available below the parameters table:

The toolbar for this are contains the following options (left to right)
- MediaType - drop-down containing MediaTypes of defined Request Representations and
also the multipart/form-data type which can be used to simulate a file-submit of an HTML form;
selecting this option will add all parameters and File Attachments of the request as Mime Parts
in a Multipart request.
- Recreate Body - action to recreate the content of the body from the corresponding
schemaElement referred to by a Representation with the selected MediaType; if selecting a mediaType
whose representation(s) specify an element in a referenced XML Schema, this action will be enabled
and prompt to generate a default message based on the schema definition.
- POST QueryString - option to put Query Arguments in the message body instead of after the
path part of the URL; this is for simulating the behaviour of a standard HTML Form submitted with POST.
Representations and Attachments
Request/Response Representations are defined and available via their corresponding inspectors at the bottom
of the requet/response editors and are used as already described.
Attachments are used in several ways;
- If the method is PUT or POST and the mediaType of the body is the same as that of a request attachment,
that attachment is inserted into the message body instead
- If the method is PUT or POST and the mediaType of the body is the same as that of several request attachments,
these attachments are sent as a Multipart body
- If the method is PUT or POST and the mediaType is multipart/form-data, all query parameters and request
attachments are sent as Mime Parts in a Multipart body.
Response Handling
Response received for a Request are displayed to the right. JSON responses have a dedicated
viewer which pretty-prints the result:

Internally both JSON and HTML results get converted to XML which allows them to be inspected using the
soapUI Pro inspectors, for example the Table Inspector:

Or the soapUI Pro Overview view:

soapUI Pro Form Editor
soapUI Pro enhances REST requests in the same way as WSDL requests:
- By providing Form / Outline / Overview views of requests and responses
- By providing a number of inspectors for response message content
The Pro Form editor renders an input-friendly form for the defined parameters and
also provides a Form-based editor for request XML representations that are defined
in an included XML Schema. For example the following Form:

The parameters are rendered as configured in their Details tab, the lower part contains
a drop-down for selecting from the representations that have a corresponding element. Once
selected, the corresponding form will be rendered (as shown in the screenshot).
Next:
REST Service overview