The fault element specifies the contents of SOAP Fault Details element. It is patterned after the body element.
Table 1–8 The SOAP Fault Element Attributes|
Property |
Description |
Required or Optional |
Example |
|
name |
Indicates the name of the part from the WSDL message that will be included in the fault element. |
Required |
part1 |
|
use |
Indicates how message parts will be encoded in the SOAP fault. |
Required |
literal |
|
encodingStyle |
Indicates a particular encoding style to use. |
Optional |
http://someencodingstyle |
|
namespace |
Indicates the namespace of the wrapper element for RPC style messages. |
Optional |
urn:someNamespace |
The following example illustrates the SOAP fault element:
<definitions .... >
<binding .... >
<operation .... >
<fault>*
<soap:fault name="nmtoken" use="literal|encoded"
encodingStyle="uri-list"? namespace="uri"?>
</fault>
</operation>
</binding>
</definitions>
|
The name attribute relates the soap:fault to the wsdl:fault defined for the operation. The fault message MUST have a single part.
The use, encodingStyle and namespace attributes are all used in the same way as with Body, only style="document" is assumed, since faults do not contain parameters.