Ask the Expert

Rules specifying faults in a WSDL document

Are there any rules specifying faults in a WSDL document when using the document/literal/wrapped convention?

In my case, I have a schema (types.xsd) that defines an InvalidDataException complexType. In order to specify this fault on a Web service method using the d/l/w convention, would I be required to define an element such as and then define the message as such:

<wsdl:message name="InvalidDataException">
<wsdl:part name="fault" element="tns:InvalidDataException"/>
</wsdl:message>

Or could the message simply reference the complexType defined in the types.xsd as follows:

<wsdl:message name="InvalidDataException">
<wsdl:part name="fault" type="types:InvalidDataException"/>
</wsdl:message>

    Requires Free Membership to View

SOAP Faults should always be defined as doc/literal regardless of the type of service. Therefore it should be defined as such:
<wsdl:message name="InvalidDataException">
<wsdl:part name="fault" element="tns:InvalidDataException"/>
</wsdl:message>

Note that when using doc/literal/wrapped you must reference an element (not a type) from the SOAP body part, too.


This was first published in July 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: