Using the HTTP Binding Component

SOAP 1.2 fault Element

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

Table 12 SOAP 1.2 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 1.2 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.


<wsdl:definitions ... >
...
	<wsdl:binding ... >
	...
		<wsdl:operation ... >
		...
			<wsdl:fault ... >*
				<soap12:fault name="xs:NMTOKEN"
						namespace="xs:anyURI" ?
						use="literal|encoded" ?
						encodingStyle="xs:anyURI" ? ... />
				...
			</wsdl:fault>
		</wsdl:operation>
	...
	</wsdl:binding>
...
</wsdl:definitions>

The name attribute (of type xs:NMTOKEN) associates the corresponding wsdl:fault defined in the wsdl:portType for the containing wsdl:operation.

The use attribute, if present, indicates whether the message parts are encoded using some encoding rules, or whether the parts define the concrete schema of the message. If the value is "encoded" the message parts are encoded using some encoding rules as specified by the value, actual or implied, of the encodingStyle attribute. If the value is "literal" then the message parts are literally defined by the schema types referenced.

The namespace attribute (of type xs:anyURI), if present, defines the namespace to be assigned to the wrapper element for the fault. This attribute is ignored if the style attribute of either the soap12:binding element of the containing wsdl:binding or of the soap12:operation element of the containing wsdl:operation is either omitted or has a value of “document”. This attribute must be present if the value of the style attribute of the soap12:binding element of the containing wsdl:binding is “rpc”. The value of the namespace attribute must not be a relative URI.

The encodingStyle attribute (of type xs:anyURI), if present, identifies the set of encoding rules used to construct the fault message. This attribute must not be present unless the style attribute of the soap12:binding element of the containing wsdl:binding has a value of “rpc” and the use attribute on the containing soap12:body element has a value of "encoded". The value of the encodingStyle attribute must not be a relative URI.