Java Reference
In-Depth Information
</catch>
</faultHandlers>
The faultName attribute refers to the name of the SOAP fault that you want to catch. Note that
your WSDL must include fault information for the variable's messageType attribute value.
For example, because here you have decided that the CartFault variable will be of type
<cartFaultType> , you need that message defined in a WSDL referred to by this process.
Here's a snippet from an example WSDL that represents the shopping cart service acting as a
process partner:
<message name="cartFaultType">
<part name="faultInfo" type="xsd:string"></part>
</message>
<portType name="CartPort">
<operation name="placeOrder">
<input name="submitOrderRequest" message="tns:OrderMsg"></input>
<output name="orderResponse" message="tns:OrderMsg"></output>
<fault name="cannotCompleteOrder"
message="tns:cartFaultType"></fault>
</operation>
</portType>
<binding name="cartBinding" type="tns:cartPort">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="placeOrder">
<soap:operation style="rpc"/>
<input name="submitOrderRequest">
<soap:body parts="purchaseOrder" use="literal"/>
</input>
<output name="orderResponse">
<soap:body parts="purchaseOrder" use="literal"/>
</output>
<fault name="cannotCompleteOrder">
<soap:fault name="cannotCompleteOrder" use="literal"/>
</fault>
</operation>
</binding>
Here the WSDL represents the <fault> as a first-class citizen along with the inputs and out-
puts. You declare a message type that holds the fault detail information, and that information
is associated with the placeOrder operation in the abstract portion of the WSDL. Finally, in
the binding section, that fault is made concrete in the form of a SOAP fault.
Search WWH ::




Custom Search