Problem solve Get help with specific problems with your technologies, process and projects.

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"/>

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"/>

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"/>

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

This was last published in July 2004

Dig Deeper on Service-oriented architecture (SOA)



Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.