W3C home > Mailing lists > Public > www-ws-desc@w3.org > June 2006

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

From: Craig Salter <csalter@ca.ibm.com>
Date: Thu, 15 Jun 2006 14:31:38 -0400
To: www-ws-desc@w3.org
Message-ID: <OF45EB27F9.36B1B21F-ON8525718E.006528E4-8525718E.0065C5B2@ca.ibm.com>

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:part name=""/>

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

  <part name=""/>

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>
Here's snippets of the MIME schema for the WSDL 1.1 and xmlsoap.org for

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

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

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

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

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

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

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

    <wsdl:documentation .... /> ?

    <wsdl:types> ?

    <wsdl:message name="nmtoken"> *

    <wsdl:portType name="nmtoken">*

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

    <wsdl:service name="nmtoken"> *

    <-- extensibility element --> *


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" >
      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: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: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" />
      <!-- here is the fix that will allow extensibility elements to occur
in any position -->
      <xs:any namespace="##other" processContents="lax" />
      <!-- end fix -->

[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



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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:54:59 UTC