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

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.


Dig Deeper on Topics Archive

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.

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAWS

SearchCloudComputing

TheServerSide.com

Close