Using the HTTP Binding Component

SOAP 1.1 fault Element

The fault element specifies the contents of SOAP Fault Details element. It is patterned after the body element.

Table 5 SOAP 1.1 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 those used with the body element, except that style="document" is assumed, because faults do not contain parameters.