ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wsdl
wsdl
[wsdl] Array definition example in the WSDL spec is invalid
by James Pasley other posts by this author
Dec 13 2001 12:27PM messages near this date
Re: [wsdl] Array definition example in the WSDL spec is invalid | Re: [wsdl] Array definition example in the WSDL spec is invalid
The WSDL specification contains the following example of an array of floats:

<complexType name="ArrayOfFloat"> 
  <complexContent> 
    <restriction base="soapenc:Array"> 
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:float[]"/> 
    </restriction> 
  </complexContent> 
</complexType> 

This is invalid as the Schema Primer states that:

    that types derived by restriction must repeat all
    the components of the base type definition that are to be
    included in the derived type

The implication of this is that the above definition describes a
complexType which can never contain child elements. The use of such
definitions causes problems for any software which correctly applies
the rules of xml schemas to such definitions.

In order for it to contain elements, it must either:
	repeat the <xs:any>  from the original SOAP array definition
or
	replace it with a more restrictive definition.

There are a number of different ways to define an array. However, the
example in the spec should be replaced with the following:

<xs:complexType name="ArrayOfFloat"> 
  <xs:complexContent> 
    <xs:restriction base="soapenc:Array"> 
      <xs:sequence> 
        <xs:element name="item" minOccurs="0" maxOccurs="unbounded"
type="xs:float" /> 
      </xs:sequence> 
      <attribute ref="soapenc:arrayType" wsdl:arrayType="xs:float[]"/> 
    </xs:restriction> 
  </xs:complexContent> 
</xs:complexType> 


To make matters worse, such definitions appear in the interop tests for
WSDL.
Propagating such invalid definitions even further.

We need an errata for the WSDL spec so that the use of this invalid array
definition can be prevented.

James.


Cape Clear Software Limited.
61 Fitzwilliam Lane
Dublin 2
Ireland

Email : james.pasley@[...].com
Switchboard  : + 353 (1) 2419900
Direct line  : + 353 (1) 2419957
Fax          : + 353 (1) 2419901
www          : www.capeclear.com

Visit www.capescience.com


------------------------ Yahoo! Groups Sponsor ---------------------~--> 
Need new boots for winter? Looking for a perfect gift for your shoe loving friends?
Zappos.com is the perfect fit for all your shoe needs!
http://us.click.yahoo.com/ltdUpD/QrSDAA/ySSFAA/W6uqlB/TM
---------------------------------------------------------------------~-> 

To unsubscribe from this group, send an email to:
wsdl-unsubscribe@[...].com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
Thread:
James Pasley
Bob Cunnings
James Pasley

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved