...
The literal XML is graphically represented in the Form XML mode, giving you a flexible alternative in configuring XML messages. You can add, remove, and rename XML components of the XML message. In addition, if any data sources are available, data source values can be used in configuring XML messages. Any changes made in the Form XML mode will also be made in the Literal
...
XML
mode LiteralXML mode and vice versa.
If Form XML is selected as the SOAP Envelope, the lower part of the panel consists of an XML View Tree and XML Configuration Tabs.
...
Info | |||
---|---|---|---|
| |||
If you want a simple way to view and work with an existing XML message (e.g., a sample from developers, traced from the server, from legacy testing tools, etc.), you can copy it into the Literal Conditional Content | | Product: (SOAVirt, SOAtest) | Product: (SOAVirt, SOAtest) |
sv-attr:0A010204015A9054C88481D043445E2F | 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01 | ||
XML | |||
Conditional Content | Product: (SOAVirt, SOAtest) | Product: (SOAVirt, SOAtest) | |
sv-attr:0A010204015A9054C88481D043445E2F | 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01 | ||
XML |
...
Option | Description | |||||
---|---|---|---|---|---|---|
Cut/Copy/Paste | Select to cut, copy, or paste an XML node in Form XML. When attempting to paste an element within the root element, a dialog will display asking you whether to replace the entire content, or add as a child. You can perform cut, copy, and paste operations across multiple XML View Trees Conditional Content | Product: (SOAVirt, SOAtest) | Product: (SOAVirt, SOAtest) | sv-attr:0A010204015A9054C88481D043445E2F | 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01 | within Diff tools, SOAP Clients, HTTP Traffics, etc . These operations persist parameterization and any other exclude/encode settings. |
Insert New | Select to insert a new Element, Attribute, or Namespace Declaration. Depending on your selection, the corresponding tab will display parameter options. | |||||
Move Up | Select to move a node up within the XML View Tree. | |||||
Move Down | Select to move a node down within the XML View Tree. | |||||
Remove | Select to remove a node from the tree. | |||||
Encode Child Elements | Select to encode a subtree of elements as text content for its parent element. If this option is selected for a particular node, all child elements of that node will display as italicized in the Form XML tree, and will be encoded as text within the parent element, rather than as XML. If this option is not selected, child elements will not be encoded and will remain as sub-elements. | |||||
Import Schema Element | Select to choose elements for both the body and the header. After selecting this option, a dialog appears from which you can load declared elements from a schema location. After loading elements, you can select multiple elements for the SOAP header. Once you click OK, a SOAP Envelope will be created based on the chosen element definitions. | |||||
Populate | Fills SOAP array and element parameters. This also sets any element nils to false and expands them out. This command is only available if the tool is created from a WSDL. | |||||
Expand All | Select to expand all nodes in the XML View Tree. | |||||
Collapse All | Select to collapse all nodes in the XML View Tree. | |||||
Show Namespaces | Select to view the namespaces within the XML View Tree. | |||||
Show Attributes | Select to view the attributes within the XML View Tree. | |||||
Beautify | Select to beautify all well-formed XML fragments. |
...
Create a data source with columns that contain the values you would like to send as part of a message, and columns that contain the empty and non-empty strings that signify the inclusion or exclusion of an element.
In the following data source example, the Value column contains values of name and password, and the Exclude Password column has a value of Don’t Exclude, as well as an empty string.Conditional Content Product: (SOAVirt, SOAtest) Product: (SOAVirt, SOAtest) sv-attr:0A010204015A9054C88481D043445E2F 0A010204015CF6008A11EEF43AC91334 0A010204015A9054C886C0AC137B8C01
For more information on configuring data sources, see Parameterizing Tests with Data Sources, Variables, or Values from Other Tests.- Ensure that the correct data source is selected from the Data Source menu in the tool panel.
- Check the Use Data Source: Exclude with empty string check box in either the Element or Attribute Form XML Configuration Tab.
- In the drop-down box next to the Use Data Source: Exclude with empty string check box, select the appropriate column that contains the empty string.
- In the Value drop-down boxes, specify the content value of the Element/Attribute by selecting Parameterized and the appropriate column that contains the data source values to be sent as part of the message.
When the tool is run, the password value from the data source will not be sent as part of the message because it was excluded by the empty string in the Exclude Password column that was chosen from the Use Data Source: Exclude with empty string drop-down box.
To send all of the parameterized values from a data source, do not select the Use Data Source: Exclude with empty string check box.