Feedback

  • Contents
 

SOAP Set Element Type

In SOAP, the type of an argument or the return value is specified by the service description and doesn’t need to be included in the payload. However, the service may define the type as xsd:anyType, for example for VARIANT types. In this case, the type must be included in the argument. For example, if a type of “double” is specified, an element will look as follows:

<Element xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:type=“xsd:double”>1234.567</Element>.

Note: the type may be a user defined (complex) type. For example:

<ns1:Order xmlns:ns1=“uri:my-order-type”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:type=“ns1:Order”>
<ns1:Product>Watchmacallit</ns1:Product>
<ns1:Quantity>7</ns1:Quantity>
<ns1:Price>19.99</ns1:Price>
</ns1:Order>.

Please refer to http://www.w3.org/TR/xmlschema-0 or http://www.w3.org/TR/xmlschema-2 for details on the XML Schema Datatypes.

Inputs

Element

Node of an element whose Schema instance type to set.

Type

String XSD type to declare for this element. See remarks for details. The argument may either be just the type name or have schema namespace prefix, such as xsd:string. If the type argument does not contain a prefix, xsd will be used.

Type Namespace

Namespace of the type. Optional.

Default: http://www.w3.org/2001/XMLSchema

XSI Namespace

XML Schema Instance namespace. Optional.

Default: http://www.w3.org/2001/XMLSchema-instance

XSI Namespace Prefix

Prefix of the schema instance namespace. Optional.

Default: xsi

Declare Namespaces in Envelope

Leave this box checked to declare the XSD and XSI namespaces in the Envelope element (actually, the document element is used, as this tool may be for other purposes than SOAP).

If any of the parent elements already has a NS declaration for a prefix and the namespace URI is different, the declaration will be added to the element, and not the Envelope.

Clear this checkbox to declare the XSD and XSI namespaces in the element itself.

Exit Paths

Success

This path is taken if element type is successfully set.

Failure

This path is taken if the operation fails.