- From: Anne Thomas Manes <anne@manes.net>
- Date: Thu, 5 Dec 2002 08:04:00 -0500
- To: "Jacek Kopecky" <jacek@systinet.com>, "Sanjiva Weerawarana" <sanjiva@watson.ibm.com>
- Cc: "Martin Gudgin" <mgudgin@microsoft.com>, "WS Description WG" <www-ws-desc@w3.org>, <mats_henricson@yahoo.com>
Sanjiva/Jacek, The WSDL 1.1 spec [1] defines a "recommended approach" for encoding arrays _if_ the type system you're using doesn't have widespread use. My interpretation of the spec, though, is that anything supported in the XSD type system is valid. Mats should not have encountered the error he did. I'd view the error as a bug in his SOAP/WSDL implementation. From the WSDL 1.1 spec: 2.2. Types The types element encloses data type definitions that are relevant for the exchanged messages. For maximum interoperability and platform neutrality, WSDL prefers the use of XSD as the canonical type system, and treats it as the intrinsic type system. <definitions .... > <types> <xsd:schema .... />* </types> </definitions> The XSD type system can be used to define the types in a message regardless of whether or not the resulting wire format is actually XML, or whether the resulting XSD schema validates the particular wire format. This is especially interesting if there will be multiple bindings for the same message, or if there is only one binding but that binding type does not already have a type system in widespread use. In these cases, the recommended approach for encoding abstract types using XSD is as follows: * Use element form (not attribute). * Don't include attributes or elements that are peculiar to the wire encoding (e.g. have nothing to do with the abstract content of the message). Some examples are soap:root, soap:encodingStyle, xmi:id, xmi:name. * Array types should extend the Array type defined in the SOAP v1.1 encoding schema (http://schemas.xmlsoap.org/soap/encoding/) (regardless of whether the resulting form actually uses the encoding specified in Section 5 of the SOAP v1.1 document). Use the name ArrayOfXXX for array types (where XXX is the type of the items in the array). The type of the items in the array and the array dimensions are specified by using a default value for the soapenc:arrayType attribute. At the time of this writing, the XSD specification does not have a mechanism for specifying the default value of an attribute which contains a QName value. To overcome this limitation, WSDL introduces the arrayType attribute (from namespace http://schemas.xmlsoap.org/wsdl/) which has the semantic of providing the default value. If XSD is revised to support this functionality, the revised mechanism SHOULD be used in favor of the arrayType attribute defined by WSDL. * Use the xsd:anyType type to represent a field/parameter which can have any type. [1] http://www.w3.org/TR/wsdl#_types Anne > -----Original Message----- > From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org]On > Behalf Of Jacek Kopecky > Sent: Thursday, December 05, 2002 4:58 AM > To: Sanjiva Weerawarana > Cc: Martin Gudgin; WS Description WG > Subject: Re: wsdl:types and arrays > > > > Sanjiva, what arrays are you talking about specifically? > > Is it SOAP Encoding arrays? In that case we'd have more problems with > XS. > > Is it just any kind of arrays? I think XS supports arrays nicely, > together with more complex structures. minOccurs and maxOccurs should be > the right constraints here. 8-) > > I think we should revamp or drop WSDL support for SOAP Encoding, and I'd > be very wary of trying to fit XML Schema in there. > > Best regards, > > Jacek Kopecky > > Senior Architect, Systinet Corporation > http://www.systinet.com/ > > > > > On Thu, 2002-12-05 at 07:50, Sanjiva Weerawarana wrote: > > > > WSDL 1.1 had some text to provide a "standard" way to describe > > arrays. How should we (or should we not) move that forward? This > > is an issue because XSD doesn't support arrays and they are a > > relatively normal concept in many settings. > > > > Sanjiva. > > > > ----- Original Message ----- > > From: "Martin Gudgin" <mgudgin@microsoft.com> > > To: <mats_henricson@yahoo.com>; <www-ws-desc@w3.org> > > Sent: Monday, December 02, 2002 2:26 PM > > Subject: RE: wsdl:types and arrays > > > > > > > > > > Hi Matt, > > > > > > Can you point me to the language in the WSDL 1.2 spec that > leads you to > > > believe that you can't use maxOccurs on an element > declaration in WSDL? > > > AFAIR that it was NOT the WGs intention to have such a limitation. > > > > > > I'll take info on 1.1 aswell but we're not revving that document. > > > > > > Cheers > > > > > > Gudge > > > > > > > -----Original Message----- > > > > From: Mats Henricson [mailto:mats_henricson@yahoo.com] > > > > Sent: 29 November 2002 23:21 > > > > To: www-ws-desc@w3.org > > > > Subject: wsdl:types and arrays > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, all! > > > > > > > > I was pretty enthusiastic about using web services, SOAP > > > > and WSDL, until I realized the severe XSD limitation in WSDL. > > > > I have a 4 page long XSD, and a 200 kB long hand-written XML > > > > document that follows that XSD. According to the WSDL 1.1 and > > > > 1.2 I can't use this XSD construct: > > > > > > > > <xsd:element ... maxOccurs="unbounded"/> > > > > > > > > I just barely can believe this limitation really exists! > > > > I would have to do heavy changes of my large XML document > > > > just to be able to use SOAP?! > > > > > > > > Pretty much every single XSD tutorial out there suggests > > > > the use of maxOccurs="unbounded". > > > > > > > > Is it really true that it can't be used in WSDL, or have I > > > > totally misunderstood? If that limitation really exists, why > > > > don't you remove it in this new upcoming version of WSDL? > > > > > > > > Worried greetings from > > > > > > > > Mats Henricson > > > > > > > > > > > > __________________________________________________ > > > > Do you Yahoo!? > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > > > http://mailplus.yahoo.com > >
Received on Thursday, 5 December 2002 08:01:21 UTC