WSDL message properties

As part of your web services testing, you can configure how content in the XML or SOAP message is handled. You can do so by viewing and editing the WSDL message properties.

Operation header properties

Each operation that is contained within the WSDL defines a set of header properties that can be sent with the message. During the processing of the WSDL these properties are extracted from the operation and when an operation message is selected these properties are automatically added to the header properties of the HCL OneTest™ API message. These properties generally consist of the Content-type of the message (usually xml/text) and the SOAP Action.

SOAP Faults

When a web service request generates an error within the server, the server sends a reply message back that contains a SOAP Fault element instead of a SOAP Body element. This SOAP Fault is defined within the SOAP Envelope XML schema definition. When a SOAP Fault is received, both the RPC-Encoded and the Document-Literal Formatters generate a HCL OneTest™ API message that has the same structure. They both extract the SOAP Fault element and generate a standard XML Message structure in the same manner as the XML Text Message Formatter. Since SOAP Faults are not defined within the WSDL file, they are handled by using the standard XML schema process.

Within HCL OneTest™ API, an XSD schema can be defined that references a SOAP Envelope XML schema definition. There are several of these definitions and they can vary from one to another. Select the SOAP Envelope that contains the SOAP Fault definition that is expected. If it is expected that a SOAP Fault is to be returned from a request, then within the receive request select the wanted SOAP Envelope XSD as the schema for the message. Next, select the Fault root and build the expected structure with whatever validation is required.

XML and SOAP message properties

Using the message properties in HCL OneTest™ API, you can configure how a message content is treated in test actions (for example, Publish, Subscribe). To view or modify message properties, right-click on the root of the SOAP message in the requirement or in the body of the message editor.

Message editor

Use the Field Properties dialog to view or edit the message properties.

XML field properties
Note: Click Preview at any time to view the message as it is applied by using the properties that you modified.

XML properties

By using the XML tab, you can configure how XML content in the message is handled.

XML properties
Table 1. XML properties. The options available for handling XML are described in the table
Formatting Select how XML is to be formatted, either Single-line or Multi-line indented.
Encoding Select the encoding to use, either UTF-8 or UTF-16.
Normalize empty text nodes If enabled, extra spaces are removed from the XML.
Send NULL values If enabled, null can be sent for empty fields.
Include XML Declaration Enable this option to force the inclusion of the XML declaration at the beginning of the message.
Treat CDATA as Text Enable this option to treat CDATA fields in the XML as text.
Default xml:space to preserve Enables or disables the preservation of white space in XML.
Note: The default values for the XML options can be modified by using the HCL OneTest™ API preferences (Window > Preferences, then select the XML option).

SOAP headers

By using the SOAP Headers tab, you can enable or disable the sending of SOAP headers with the message, and displays any headers that are included in the current message.

SOAP Headers

Select or clear the Enable option to toggle whether SOAP headers are included.

Note: The default setting for SOAP headers can be specified in the HCL OneTest™ API preferences (Window > Preferences, then select the SOAP option).

SOAP

In the SOAP tab, you can specify the version of SOAP (1.1 or 1.2) and also other parameters that must be applied for sending the message.

SOAP field properties
Select the SOAP version from the list and specify the namespace for the message. The default SOAP envelope namespace prefix used for SOAP 1.1 message is SOAP-ENV and SOAP 1.2 message is env. You can specify a different prefix for the message in the Envelope Namespace Prefix field.

Note: The default SOAP version can be specified in the Window > Preferences > SOAP window.

WS-Addressing

Using the WS-Addressing tab, you can enable or disable message constructs (that is, endpoints and information headers) to be sent with the SOAP message. You can also modify the WS-Addressing properties to be sent.

Note: The sending of WS-Addressing constructs can be enabled or disabled by default in the HCL OneTest™ API preferences (Window > Preferences, then select the WS-* Extensions option).

WS-Security

Using the WS-Security tab, you can enable or disable Web Services security actions to be sent with the SOAP message. Details about creating and configuring the available actions can be found in Web services security actions.

Note: The sending of WS-Security actions can be enabled or disabled by default in the HCL OneTest™ API preferences (Window > Preferences, then select the WS-* Extensions option).
Feedback