problems with WSDL 1.1 schemas available at http://schemas.xmlsoap.org (disagree with WSDL 1.1 spec)

My apologies if this gets posted twice my first attempt got held up
'waiting for approval'.

The WSDL 1.1 related schemas available at xmlsoap.org[1]  for WSDL [2] and
MIME [3] disagree with the WSDL 1.1 spec [4].   I believe these errors are
easy to correct and I've provided instructions below to describe the fixes.
Since the community looks upon the schemas hosted at xmlsoap.org as the
'official' schemas of the WSDL 1.1 spec I think this is important to fix.

Jonathan, is there a process available to the community to request changes
to the schemas hosted at this Microsoft server?

Here's the details on these problems...

1) Qualification of the MIME <part> element

The version of the MIME schema [3] hosted at  xmlsoap.org uses a 'local'
element to define the <part> element that can occur within a
<mulitPartRelated> element.  Since the schema does not use
elementFormDefault="qualified" then this element will not be prefixed.   So
according to the WSDL 1.1 the instance should look like this...

<mime:multipartRelated>
  <mime:part name=""/>
</mime:multipartRelated>

... but according to the schema at xmlsoap the instance will look like
this...

<mime:multipartRelated>
  <part name=""/>
</mime:multipartRelated>

The simple 'fix' here is to either use elementFormDefault="qualified" or to
do as the WSDL 1.1 does and use a global element to define the <part>
element.
Here's snippets of the MIME schema for the WSDL 1.1 and xmlsoap.org for
comparison...

>From the WSDL 1.1 MIME schema (section A 4.4)....

  <complexType name="multipartRelatedType" content="elementOnly">
      <element ref="mime:part" minOccurs="0" maxOccurs="unbounded"/>
   </complexType>


>From xmlsoap's MIME schema [3] ....

  <complexType name="multipartRelatedType">
       <complexContent>
             <extension base="wsdl:tExtensibilityElement">
                   <sequence>
                         <element name = "part" type = "mime:tPart"
minOccurs="0" maxOccurs="unbounded"/>
                   </sequence>
             </extension>
       </complexContent>
  </complexType>


2) Location of extensibility elements under the <definitions> element

>From the WSDL 1.1 (section 2.1) the children of the <definitions> element
are ordered so that extensibility elements come last as shown below.  This
consistent with the WSDL schema that 's defined in  the appendix (section A
4.1).

<wsdl:definitions name="nmtoken"? targetNamespace="uri"?>

    <import namespace="uri" location="uri"/>*

    <wsdl:documentation .... /> ?

    <wsdl:types> ?
    </wsdl:types>

    <wsdl:message name="nmtoken"> *
     </wsdl:message>

    <wsdl:portType name="nmtoken">*
    </wsdl:portType>

    <wsdl:binding name="nmtoken" type="qname">*
    </wsdl:binding>

    <wsdl:service name="nmtoken"> *
    </wsdl:service>

    <-- extensibility element --> *

</wsdl:definitions>

However, the WSDL schema available at the xmlsoap [2] does not allow
extensibility elements to come last within a <definition> although it does
allow them to come first.  Strangely this conflicts with the comments in
this schema's documentation which says "Any extensibility element is
allowed in any place".  Although it defies the WSDL 1.1 spec, it's  very
common in practise to have extensibility elements as the first elements and
as the last elements of the <definitions> element  so I believe the best
fix for this problem is support extensibility elements at any position
within the <definitions> element.  Here's the change required to the
xmlsoap's WSDL schema [2] to fix this...


<xs:group name="anyTopLevelOptionalElement" >
    <xs:annotation>
      <xs:documentation>
      Any top level optional element allowed to appear more then once - any
child of definitions element except wsdl:types. Any extensibility element
is allowed in any place.
      </xs:documentation>
    </xs:annotation>
    <xs:choice>

      <xs:element name="import" type="wsdl:tImport" />
      <xs:element name="types" type="wsdl:tTypes" />
      <xs:element name="message"  type="wsdl:tMessage" >
        <xs:unique name="part" >
          <xs:selector xpath="wsdl:part" />
          <xs:field xpath="@name" />
        </xs:unique>
      </xs:element>
      <xs:element name="portType" type="wsdl:tPortType" />

      <xs:element name="binding"  type="wsdl:tBinding" />
      <xs:element name="service"  type="wsdl:tService" >
        <xs:unique name="port" >
          <xs:selector xpath="wsdl:port" />
          <xs:field xpath="@name" />
        </xs:unique>
      </xs:element>
      <!-- here is the fix that will allow extensibility elements to occur
in any position -->
      <xs:any namespace="##other" processContents="lax" />
      <!-- end fix -->
    </xs:choice>
  </xs:group>



[1] http://schemas.xmlsoap.org
[2] http://schemas.xmlsoap.org/wsdl/
[3] http://schemas.xmlsoap.org/wsdl/mime/
[4] http://www.w3.org/TR/wsdl

thanks

Craig


Craig Salter
Rational Studio XML Web Services
Internal Mail: D3/RY6/8200 /MKM
Phone: (905) 413-3918  TL: 969-3918 FAX: (905) 413-4920
Internet: csalter@ca.ibm.com     Notes: Craig Salter/Toronto/IBM@IBMCA

Received on Thursday, 15 June 2006 18:32:04 UTC