09 July 2009 - 3.0 user guide eclipse intellij netbeans maven download nightly forum bugs blog sf.net eviware


Eviware Logo

Working with Requests

An unlimited number of requests can be added to an operation in soapUI. Each request can have its own message content, endpoint, encoding, etc. Requests are mainly managed through the request-editor displayed when double clicking a request node in the navigator (described below)

Start soapUI Testing
Did you know?

In soapUI Pro you have two more request and response editors; The Form editor and the Outline Editor. Both will improve your productivity and make Web Service Testing more fun.

soapUI Pro contains productivity enhancements as well as offers Professional World Class support.

Try soapUI pro to soap test

Request Actions

The following actions are available from the request nodes' right-button menu:

  • Show Request Editor - opens the Request Editor described below
  • Add to TestCase - prompts to add the request to a TestCase. If no TestCase is available, soapUI will prompt to create both a TestSuite or TestCase if required
  • Add to MockService - prompts to add the requests' operation to a MockService. If a response is available for the request, it will be used as the default MockResponse.
  • Add as MockResponse Step - prompts to create a MockResponse Step this request in an existing or new TestCase. If a response is available for the request, it will be used as the response content.
  • Copy to TestRequests (soapUI Pro only) - opens dialog for copying/merging this request to existing TestRequests (see below)
  • Clone Request - prompts to clone this request, the cloned request will be added to the operation and its request-editor will be opened
  • Rename - prompts to rename the request in the navigator
  • Delete - prompts to remove the request from its operation
  • Online Help - Displays this page in an external browser

Request Details Tab

General Properties

  • Name : the name of the request
  • Description : an arbitrary description of the request, displayed as a tooltip over the requests node in the Navigator.
  • Message Size : The number of characters in the current request message (including whitespace).
  • Encoding : The encoding used by the request
  • Endpoint : The endpoint for the request
  • Bind Address : The local IP Address to bind to when sending the request.
  • WS-Addressing : enables/disables ws-addressing.
  • Follow Redirects : follows HTTP Redirect response messages
  • Skip SOAP Action : : does not add SOAPAction header to request

Security/Authentication Properties

  • Username : The username to use if the request requires authentication
  • Password : The password to use if the request requires authentication
  • Domain : The domain to use if the request requires NTLM authentication)
  • WSS-Password Type : Selects the type of WS-Security username/password token to dynamically add to each outgoing request. The above specified Username and Password values will be used for the corresponding header values
  • WSS-TimeToLive : If set, automatically inserts a WSS TimeToLive token in any outgoing requests using the specified TimeToLive (in milliseconds)
  • SSL Keystore : sets path to SSL keystore for request

Attachment-Related Properties

  • Enable MTOM/Inline : Enable MTOM-based transfer and inlining of binary data in the request (see Attachments).
  • Force MTOM : Always use MTOM packaging for requests, even if there are no MTOM attachments.
  • Inline Response Attachments : the entire HTTP response for a request (including MIME/XOP attachments, etc..) will be shown in the response editor instead of attachments being parsed and visible in the Response Attachments tab.
  • Expand MTOM Attachments : received MTOM attachments will be inlined into the response message editor, allowing correct viewing and validation of the actual message.
  • Disable Multipart : Tells soapUI not to pack attachments with the same type into a multipart attachment, see Multipart Attachments for more details.
  • Encode Attachments : Tells soapUI to automatically encode attachments that have a corresponding WSDL part with the xsd-type set to either base6Binary or hexBinary.
  • Enable Inline Files : enables/disables inline files , see Working with WS Attachments and Inline Files
  • Entitize Properties : entitize property-expansion values

Post-Processing Properties

  • Strip Whitespaces : Strips outgoing requests of any unnecessary whitespaces and XML comments, required by some servers.
  • Remove Empty Content : Removes empty elements/attributes from outgoing requests. This can be useful in Data Drive TestRequests which contain elements/attributes that not always contain data and should be removed in those cases.
  • Prity Print : enables more readable text format
  • Dump File : file where response will be stored
  • Max Size : maximum numbers of bytes to receive

The Request Editor

The request editor is opened by either double-clicking a request in the navigator or by selecting its Open Request Editor popup menu item, and displays the current request and response messages together with a toolbar and a number of detail tabs as shown below in a configurable Editor Layout.

The soapUI Request editor

Vertically on the left side of each editor are tabs for each editor view. The 'XML' source view is always available, as is the 'Raw' source view. soapUI Pro also adds the following addition views:

The following inspectors are available at the bottom of each message editor;

In soapUI Pro, the bottom right corner (under the scrollbar) contains a button to show a panorama view of the current editor view, allowing easier navigation around large/complex messages/views (available in all editor views, see screenshot to the right)

Using the soapUI Panorama functionality

Editor Toolbar

The soapUI editor toolbar

The request-editor toolbar has the following actions (from left to right)

  • Submit - submits the request to the specified endpoint
  • Add to TestCase - prompts to add the request to a TestCase, same as the request-menu action described above
  • Add as MockResponse Step (soapUI Pro only) - prompts to create a MockResponse Step this request in an existing or new TestCase as described above.
  • Add to MockService - prompts to add the requests operation to a MockService, same as the request-menu action described above
  • Recreate Request - prompts to recreate the request xml from the operations input message definition. Also prompts if any values in the current request should be kept in the recreated request
  • Create Empty - prompts to create an empty soap-request with no soap-body
  • Clone Request - prompts to clone the request, same as the request-action described above. You will be prompted for a name for the new request and the new request will be placed after the cloned request.
  • Cancel Request - cancels an ongoing request (disabled if no request is running)
  • Endpoint Combo - a combo-box listing the endpoints available for this requests operations' interface. The combo box also contains the following options (as shown in the image):
    • [edit current...] option for changing the current new endpoint directly
    • [add new endpoint...] option for adding a new endpoint directly
    • [delete current...] option for deleting the current endpoint directly
  • Tab Layout - toggles between the tab and split request editor layouts as described below
  • Editor Orientation - changes the orientation of the request/response editors between left/right and top/bottom
  • Online Help - Displays this page in an external browser

Editor Layouts

The editor is available in 2 layout modes which can be toggled with the "Tab Layout" toolbar button (top right):

  • Split Layout (default, shown above) - the editor is divided into a left request-area and a right response-area; submitting the requests posts it to its endpoint and displays the result in the right area. When moving focus to one of the editors, the dividing split pane will automatically be moved to give the focused editor a larger visible area, diminishing the requirement to resize the split pane manually when working with request/response messages. This behavior will be disabled when manually dragging the split-pane to a desired position and re-enabled when changing the split pane orientation or when closing/re-opening the request-editor for the current request. It can also be turned off completely using the designated option in the UI Settings
  • Tabbed Layout - the editor displays the request or response areas in separate tabs available at the top of the editor window. Submitting a request automatically selects the response tab after the response has been received.
  • Tabbed layout in soapUI Pro

Aut

One important part of the Request editor is the Aut Inspector at the bottom of each message editor.

This will let us use the WS-Security setting set in the WS-Security Tab in the Project viewer.

Aut Headers in soapUI

HTTP Headers

The HTTP Headers Inspector at the bottom of each message editor displays the configured/received HTTP headers for the corresponding request/response message. For request message headers, buttons for adding/removing HTTP headers to be sent with the request are available from a toolbar below the table.

HTTP Headers in soapUI

SSL Details

The SSL Details inspector at the bottom of the response editor displays a list of certificates that were involved in negotiating the current message exchange, the following screenshot shows this information for a default request to the PayPal API.

SSL Details in soapUI

WS-A Properties

The WS-A Inspector displays properties used for adding WS-A headers to a Request/MockResponse according to WS Addressing specification

  • Enable WS-A Addressing
  • Must understand indicates whether a header entry is mandatory or optional for the recipient to process.
  • WS-A Version indicates ws addressing version to be used.
  • Add default WS-A:Action indicates if by default generated action is to be added to request/mock response.
  • Action - specifies the value of the Action property. If not specified, and 'Add default WS-A:Action is checked' , default action from WSDL will be generated and added. Although Action property is mandatory by WS-A core specification by checking previous check box and leaving this empty it is possible for action property to be left unspecified for testing purposes.
  • Add default WS-A:To indicates if default To is to be added to request/mock response.
  • To - OPTIONAL element specifies the value of the To property
  • ReplyTo - OPTIONAL element specifies the value of the ReplyTo property. If not specified, and Anonymous property is set to 'required', either on Interface or Operation level , default value of 'http://www.w3.org/2005/08/addressing/anonymous' will be used (Operation level definition has priority if not 'optional').
  • ReplyTo Reference Parameters - expected to be added in XML not text form and will be included in request exactly as specified
  • Generate MessageID - indicates if messageId should be randomly generated
  • MessageID - OPTIONAL element specifies the value of the MessageID property. If not specified, and previous check box is checked , random MessageID will be generated for RequestResponse operation.
  • From - OPTIONAL element specifies the value of the From property
  • FaultTo - OPTIONAL element specifies the value of the FaultTo property
  • FaultTo Reference Parameters - expected to be added in XML not text form and will be included in request exactly as specified
  • RelatesTo- OPTIONAL element specifies the value of the RelatesTo property
  • RelationshipType- OPTIONAL element specifies the value of the RelationshipType property

Viewing header properties in WS-A Inspector

(note that all settings support property-expansion)

WS-RM Properties

The WS-RM Inspector displays properties used for setting up and using a WS-RM Sequence for the request according to the WS Reliable Messaging specification

  • Enable WS-Reliable Messaging
  • WS-RM Version indicates WS ReliableMessaging version to be used.
  • Acknowledgment to allows the user to specify where the Acknowledgments should be sent to. If left empty, it will use an anonymous address, and WS-MakeConnection to receive Acknowledgment messages. Note that WS-RM 1.0 does not provide support for WS-MC, so the AckTo should be specified for such servers. In such a case, consider using a MockService to receive the acknowledgments

Viewing header properties in WS-RM Inspector

(note that all settings support property-expansion)

XML Source Editor

The request and response XML editors support syntax highlighting, undo or redo, copy and paste, etc. soapUI Pro also adds a number of additional editor views to the default "XML"; "Outline" and "Form", together with a number of Message Inspectors shown below the request and response message The following actions are available from the request and response editor right-button menus:
  • Validate - validates the editors' content against its message definition as described below
  • Format XML - pretty-prints the xml in the editor
  • Add WSS-Username Token - prompts to add a WSS-Username SOAP-Header to the request message using the username/password specified in the Request Details Tab
  • Add WS-Timestamp - prompts to add a WS-Timestamp SOAP-Header to the request message
  • Outgoing WSS - enabled only when there are Outgoing WSS Configurations added and applies or removes outgoing wss from request.
  • WS-A Headers - enabled only when WS Addressing is enabled for the request and removes or adds WS-A Headers from the request as configured in the inspector
  • Undo/Redo/Copy/Cut/Paste/Find/Replace - standard editing functions
  • Go To Line - prompts for a line to move to
  • Show Line Numbers - toggles line-number visibility
  • Save as - prompts to save the editors content to a local file
  • Load from - prompts to load the editors content to a local file
  • Get data.. - a soapUI Pro specific popup that allows you to select a property accessible from the request for generating the corresponding property-expansion at the current caret-position.
Also, a number of custom keyboard actions are available to make your "everyday-soapui-editing" easier:
  • Alt-Enter : submits the request to the specified endpoint
  • Alt-X : cancels a running submit
  • Alt-left/right arrow : moves between element values
  • Shift-Tab : moves focus between request/response areas

Submitting requests

When submitting a request using either the submit toolbar button or the Alt-Enter editor action, the request message is sent to the selected endpoint using the specified encoding and local Bind Address. Submittal is done in a background thread so any number of requests can be running simultaneously (an animated icon in the navigator shows that they are running).

During submittal, the request/response editors are made read-only and all actions except the cancel button in the toolbar are disabled. One can cancel an ongoing request either by the "Cancel" toolbar button or by pressing Alt-X in one of the editors. If you choose to close the editor window while a request is running, you will be prompted if you first want to cancel the ongoing request. Depending on the state of the request, its thread may actually continue in the background even though soapUI shows it as canceled, but from a usability point-of-view, you should never notice.

Once a response has been received, it will be displayed in the response area and a log message will be displayed in the soapUI log view and the request editors status bar showing the time taken and size of the received response. If you choose to close the request editor without canceling an ongoing request, the response will be shown in the response area when the request editor is made visible again.

A HTTP Proxy can either be set by using the http.proxyHost and http.proxyPort system properties or through the soapUI Proxy Preferences dialog. If both are available, the system properties take precedence.

Authentication

If the service requires authentication, soapUI will attempt to authenticate using the specified username, password, or domain values specified either at the endpoint level via the Service Endpoints or those specified in the Request Details Tab (or a combination of both). Currently supported authentication types are those supported by HttpClient, i.e. Basic, Digest and NTLM authentication. SSL should work (=not tested!) if you use https urls and install JSSE accordingly.

If one of the WSS-Password Type options or the WSS-TimeToLive has been set in the Request Details Tab, soapUI will automatically add the corresponding WS-Security headers to the outgoing message, as can be seen in the HTTP log;

Viewing WS-Security headers in the HTTP log

Message Validation

When pressing Alt-V in the request or the response area, the contained message is validated against the operations message definition;
  1. The message body is validated against its schema definition
  2. The SOAP envelope and structure is validated in accordance with the WSDL and SOAP schemas
  3. If the message sends MIME attachments, their presence is validated in the Attachments Tab

Validation errors are shown in a list-box displayed under the editor. Double clicking an error will move the corresponding editor caret to the line of the error (if possible).

If the message is valid the error list is hidden and an Ok-message is displayed.

Validation is currently only supported for literal-encoded messages (both rpc and document), SOAP-encoded messages are not supported.

Logs from Message Validation
The response message editor has a similar popup menu to the request-editor containing a "Check WS-I Compliance" option. Selecting this option (if the WS-I validation tools have been configured correctly) will validate the current request or response message as configured and display a WS-I Compliance report in a separate window as described under WS-I Integrations.

Copy Requests

soapUI Pro includes this action to simplify bulk updates of TestRequests with new content. The displayed dialog is as follows:

Copying Test Requests

The options are:

  • Mode - the copy mode, see below
  • TestRequests - the TestRequests to copy or merge to
  • Create Backups - creates disabled backup TestRequest steps with existing request content
  • Open Requests - opens a list of modified TestRequests for manual post processing

When selecting ok, the existing request will be copied or merged as configured:

  • Copy : Overwrites the target TestRequest(s)
  • Update : Merges values from the source Request into the target TestRequest without overwriting
  • Keep Existing : Overwrites the target TestRequest after merging existing TestRequest values into the source Request

Please note that the merging currently requires empty elements to merge into, it will not merge at the element level, only at the value level


Next: Form Editor