[Bug 5483] WSDL schema defines fault 'element' incorrectly

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5483

           Summary: WSDL schema defines fault 'element' incorrectly
           Product: WSDL
           Version: 2.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: plh@w3.org
        ReportedBy: jakaputin@gmail.com
         QAContact: www-ws-desc@w3.org


The Part 1 Core spec defines the interface fault 'element' attribute as a
union:
"The type of the element attribute information item is a union of xs:QName and
xs:token where the allowed token values are #any, #none, or #other.".

The WSDL 2.0 schema at http://www.w3.org/2007/06/wsdl/wsdl20.xsd defines the
'element' attribute as a xs:QName. 
<xs:attribute name="element" type="xs:QName" use="optional"/>

The {message content model} property of the Interface Fault component is
constrained by assertion InterfaceFault-1013 which says:
 "An xs:token with one of the values #any, #none, #other, or #element.".

It is not possible to test for this assertion error because a schema validation
error will be reported if a WSDL 2.0 document has an interface fault with an
'element' attribute that contains one of these token values.

The schema validation error reported by Xerces is:
[Error] little.wsdl:20:58: cvc-datatype-valid.1.2.1: '#any' is not a valid
value for 'QName'.

The WSDL testcase is:

<?xml version="1.0" encoding="utf-8" ?>
<description xmlns="http://www.w3.org/ns/wsdl"
       
targetNamespace="http://greath.example.com/2004/services/reservationDetails"
        xmlns:tns="http://greath.example.com/2004/services/reservationDetails"
        xmlns:items="http://greath.example.com/2004/schemas/reservationItems"
        xmlns:xs="http://www.w3.org/2001/XMLSchema">

        <types>
                <xs:schema id="items"
               
targetNamespace="http://greath.example.com/2004/schemas/reservationItems">
                        <xs:element name="confirmationNumber" type="xs:string"
/>
                        <xs:element name="checkInDate" type="xs:date" />
                        <xs:element name="checkOutDate" type="xs:date" />
                        <xs:element name="roomType" type="xs:string" />
                        <xs:element name="smoking" type="xs:boolean" />
                </xs:schema>
        </types>

    <interface name="reservationInterface">
        <fault name="invalidDataFault1" element="#any" />
                <operation name="queryBooking"
pattern="http://www.w3.org/2004/03/wsdl/in-out">
                        <input messageLabel="In"
element="items:confirmationNumber" />
                        <output messageLabel="Out" element="items:checkInDate"
/>
                        <outfault messageLabel="Out"
ref="tns:invalidDataFault1" /> 
                </operation>
    </interface>

</description>

Received on Friday, 15 February 2008 16:46:07 UTC