RE: WSDL 2.0 element order enforcement in schema

Your schema appears to limit extension elements to
post-import/include/types, right?  We looked at that before and found it
unacceptable.  We have looked at several different ways to describe the
order of top-level elements in Schema several times, including using
substitution groups, but we've never found a solution that didn't impose
other restrictions.

 

________________________________

From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On
Behalf Of Lawrence Mandel
Sent: Tuesday, July 05, 2005 9:10 AM
To: www-ws-desc@w3.org
Subject: WSDL 2.0 element order enforcement in schema

 


While looking at the WSDL 2.0 schema today I came across a question
about the ordering of elements in a WSDL 2.0 document. 

Section 2.1.2 of the WSDL 2.0 spec defines the following XML
representation of WSDL 2.0, 

<description
     targetNamespace="xs:anyURI" >
 <documentation />*
 [ <import /> | <include /> ]*
 <types />?
 [ <interface /> | <binding /> | <service /> ]*
</description> 

This definition imposes ordering constraints on the elements in the WSDL
2.0 document. The WSDL 2.0 schema does not currently enforce this
ordering. The description type is defined as follows, 

<xs:complexType name='DescriptionType' >
   <xs:annotation>
     <xs:documentation>

        Please refer to the WSDL 2.0 specification for
                additional constraints on the contents of this type.
     </xs:documentation>
   </xs:annotation>
   <xs:complexContent>
     <xs:extension base='wsdl:ExtensibleDocumentedType' >
       <xs:choice minOccurs='0' maxOccurs='unbounded' >
         <xs:element ref='wsdl:import' />
         <xs:element ref='wsdl:include' />
         <xs:element ref='wsdl:types'/>

          <xs:element ref='wsdl:interface' />
                      <xs:element ref='wsdl:binding' />
                      <xs:element ref='wsdl:service' />
         <xs:any namespace='##other' processContents='lax' />
       </xs:choice>
                <xs:attribute name='targetNamespace' type='xs:anyURI'
use='required' />
     </xs:extension>
   </xs:complexContent>
 </xs:complexType>

The schema can be updated as follows to enforce the ordering outlined in
the spec. 

<xs:complexType name='DescriptionType' > 
    <xs:annotation> 
      <xs:documentation> 
        Please refer to the WSDL 2.0 specification for 
        additional constraints on the contents of this type. 
      </xs:documentation> 
    </xs:annotation> 
    <xs:complexContent> 
      <xs:extension base='wsdl:ExtensibleDocumentedType' > 
        <xs:sequence> 
          <xs:choice minOccurs='0' maxOccurs='unbounded' > 
            <xs:element ref='wsdl:import' /> 
            <xs:element ref='wsdl:include' /> 
          </xs:choice> 
          <xs:element ref='wsdl:types' minOccurs="0" maxOccurs="1"/> 
          <xs:choice minOccurs='0' maxOccurs='unbounded' > 
            <xs:element ref='wsdl:interface' /> 
            <xs:element ref='wsdl:binding' /> 
            <xs:element ref='wsdl:service' /> 
            <xs:any namespace='##other' processContents='lax' /> 
          </xs:choice> 
        </xs:sequence> 
        <xs:attribute name='targetNamespace' type='xs:anyURI'
use='required' /> 
      </xs:extension> 
    </xs:complexContent> 
  </xs:complexType> 

Is the omission of ordering constraints from the schema intentional? Can
someone update the schema to enforce section 2.1.2 of the spec? 


Thanks, 

Lawrence Mandel

Software Developer
IBM Rational Software
Phone: 905 - 413 - 3814   Fax: 905 - 413 - 4920
lmandel@ca.ibm.com

Received on Tuesday, 5 July 2005 19:21:32 UTC