W3C home > Mailing lists > Public > www-ws-desc@w3.org > February 2008

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

From: <bugzilla@wiggum.w3.org>
Date: Fri, 15 Feb 2008 16:46:00 +0000
CC:
To: www-ws-desc@w3.org
Message-Id: <E1JQ3hI-0003cz-Li@wiggum.w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:58:47 GMT