|
Listing 1. Here is a WSDL with a wsdl:fault. According to the WSDL specification, a fault message must have a single part. <types xmlns:tns="http://www.bea.com/servers/
wls70/samples/examples/webservices/basic/
javaclass"
xmlns:wsr="http://www.openuri.org/2002/10/
soap/reliability/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/
soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl
/mime/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/
encoding/"
xmlns:soap12enc="http://www.w3.org/2003/05/
soap-encoding"
xmlns:conv="http://www.openuri.org/2002/04/
wsdl/conversation/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<xsd:schema xmlns:xsd="http://www.w3.org/2001/
XMLSchema"
xmlns:stns="java:examples.webservices.basic.
javaclass" elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="java:examples.webservices.
basic.javaclass">
<xsd:element type="stns:MyException"
name="MyException">
</xsd:element>
<xsd:complexType name="MyException">
<xsd:sequence>
<xsd:element type="xsd:int"
name="errorId"
minOccurs="1" maxOccurs="1">
</xsd:element>
<xsd:element type="xsd:string" name=
"errorMessage" minOccurs="1"
nillable="true"
maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<message name="MyException">
<part xmlns:partns="java:examples.webservices.
basic.javaclass" type="partns:MyException"
name="MyException">
</part>
</message>
<portType name="HelloWorldPort">
<operation name="sendSOAPFault">
<input message="tns:sendSOAPFault">
</input>
<output message=
"tns:sendSOAPFaultResponse">
</output>
<fault name="MyException"
message="tns:MyException">
</fault>
</operation>
</portType>
|