W3C home > Mailing lists > Public > www-ws-desc@w3.org > May 2002

Issue: WSDL must import schemas if types from them are used

From: Prasad Yendluri <pyendluri@webmethods.com>
Date: Tue, 07 May 2002 17:27:23 -0700
Message-ID: <3CD870EA.EAE8A2E4@webmethods.com>
To: www-ws-desc@w3.org
The WSDL spec silently uses the types (and attributes) from the
"soapenc" namespace without importing the schema
(http://schemas.xmlsoap.org/soap/encoding/).

Per the XML Schema Spec Part1 (http://www.w3.org/TR/xmlschema-1/ ),
section 4.2.3 "References to
schema components across namespaces", this is needed.

For instance in example 5 (excerpt below), the use of soapenc:Array and
soapenc:arrayType requires import of the schema for soapenc:

targetNamespace="http://example.com/stockquote.wsdl"
          xmlns:tns="http://example.com/stockquote.wsdl"
          xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
          xmlns:xsd1="http://example.com/stockquote/schema"
          xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
          xmlns="http://schemas.xmlsoap.org/wsdl/">

    <types>
       <schema targetNamespace="http://example.com/stockquote/schema"
              xmlns="http://www.w3.org/2000/10/XMLSchema">

            <import namespace="soapenc" schemaLocation
="http://schemas.xmlsoap.org/soap/encoding/"> <!-Missing-->

           <complexType name="TimePeriod">
              <all>
                  <element name="startTime" type="xsd:timeInstant"/>
                  <element name="endTime" type="xsd:timeInstant"/>
              </all>
           </complexType>
           <complexType name="ArrayOfFloat">
              <complexContent>
                  <restriction base="soapenc:Array">
                      <attribute ref="soapenc:arrayType"
wsdl:arrayType="xsd:float[]"/>
                  </restriction>
              </complexContent>
           </complexType>
       </schema>
    </types>

I have seen another such situation in example 7.

Section 2.2 also needs to reflect this.

BTW this also becomes important if there are multiple schemas  within
the <types> section. Each of them need to import the ones (say others)
if they uses types from them..

Regards, Prasad
Received on Tuesday, 7 May 2002 20:24:14 GMT

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