W3C home > Mailing lists > Public > public-ws-chor@w3.org > October 2004

Fault handling proposal

From: Gary Brown <gary@enigmatec.net>
Date: Mon, 11 Oct 2004 10:29:12 +0100
Message-ID: <008501c4af74$c8782280$4b00a8c0@LATTITUDEGary>
To: "WS-Choreography List" <public-ws-chor@w3.org>

Currently an interaction only defines how request and response messages are 
modelled. However, aswell as potentially returning a normal response, an 
operation can also be defined as being able to return a fault message 
instead of the normal response. An operation can be declared to support zero 
or more fault message types.

Therefore, as well as defining an interaction as being able to handle a 
normal response being returned, we also need to cater for fault messages 
being returned.

For example, in the situation where operation 'createOrder' can either 
return a new order as a normal response, or two faults 'NoCredit' or 
'UnknownCustomer', possibly the CDL could be defined as:

<workunit>
    <interaction operation="createOrder" ..... >
        <exchange name="..." informationType="..." action="input" >
            ...
        </exchange>
    </interaction>

    <choice>
        <interaction operation="createOrder" .....>
            <exchange name="...." informationType="..." action="output" >
                ...
            </exchange>
        </interaction>

        <interaction operation="createOrder" .....>
            <exchange name="NoCredit" informationType="...." 
action="outfault" >
                ...
            </exchange>
        </interaction>

        <interaction operation="createOrder" .....>
            <exchange name="UnknownCustomer" informationType="...." 
action="outfault" >
               ...
            </exchange>
        </interaction>
    </choice>

</workunit>

I believe that this would map onto WSDL1.1 and WSDL2.0. Note that the 
exchange action field type has been changed to reflect the equivalent notion 
within WSDL2.0.

The 'name' attribute on the exchange does not appear to be used for anything 
specific in the current CDL spec. However, it could be used to reference the 
name of the fault, where the action attribute indicates either 'infault' or 
'outfault'.

The WSDL interface associated with the CDL above could be:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://example.org/TicketAgent.wsdl20" 
xmlns:wsdl="http://www.w3.org/2004/08/wsdl" >
    <wsdl:interface name="OrderManager">
        <wsdl:fault name="NoCredit" element="..." />
        <wsdl:fault name="UnknownCustomer" element="..." />
        <wsdl:operation name="createOrder" 
pattern="http://www.w3.org/2004/08/wsdl/in-out">
            <wsdl:input element=".."/>
            <wsdl:output element=".."/>
            <wsdl:outfault ref="NoCredit" />
            <wsdl:outfault ref="UnknownCustomer" />
        </wsdl:operation>
    </wsdl:interface>
</wsdl:definitions>



Concrete changes would be:

1) Change the exchange 'action' attribute to represent the WSDL2.0 
equivalent message concepts (input, output, infault and outfault).

2) Where the action attribute indicates that the exchange represents a 
fault, then the 'name' attribute represents the name of the fault.
Received on Monday, 11 October 2004 09:29:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 01:01:06 GMT