WSDL message properties
As part of web services testing, you can configure how content in the XML or SOAP message is managed, by viewing and editing the WSDL message properties.
Operation header properties
Each operation that is contained within the WSDL file defines a set of header properties that can be sent with the message. During the processing of the WSDL file, these properties are extracted from the operation and when a message for an operation is selected, these properties are automatically added to the header properties of the Rational® Integration Tester message. These properties generally consist of the content-type of the message (usually XML or text) and the SOAP action.
SOAP Faults
When a web service request generates an error within the server, the server sends a response message 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 Rational® Integration Tester 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. Because SOAP Faults are not defined within the WSDL file, they are managed by using the standard XML schema process.
Within Rational® Integration Tester, you can define an XSD schema that references a SOAP Envelope XML schema definition. There are several of these definitions and they can vary from each other.
You can 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 received request, you can select the required SOAP Envelope XSD as the schema for the message. Then, you can select the Fault root and build the expected structure with the required validation.
XML and SOAP message properties
By using the message properties in Rational® Integration Tester, you can configure how the content in a message is managed in test actions (for example, Publish, Subscribe). You can view or modify message properties by right-clicking the root of the SOAP message in the requirement or in the body of the message editor.
You can use the Field Properties dialog box to view or edit the message properties.
The tabs that you can configure in the Field Properties dialog are as follows:
XML
In the XML tab, you can configure how to manage XML content in the message.
Option | Description |
---|---|
Formatting | The XML is formatted either as a Single-line or as a Multi-line indented message. |
Encoding | The character encoding that must be used and is included in the XML Declaration, if present. |
Normalize the document | In the XML, extra spaces are removed. |
Send NULL values | Whether Elements, Attributes, or Comments with null values are included in the generated XML. |
Include XML Declaration | The XML declaration is included at the beginning of the message. |
Treat CDATA as Text | When processing, CDATA nodes are converted to Text nodes. |
Preserve whitespace | Controls whether the root node default for
xml:space is set to
preserve. |