You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by jayachandra <ja...@gmail.com> on 2005/03/15 09:27:49 UTC

WSDL generation

Trying to analyse some problem, I had to refer to wsdl 1.1 spec. There
under the 'Types' section [http://www.w3.org/TR/wsdl#_types , 3rd
bullet point], there is this mention.

** Begin of Excerpt **
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.
** End of Excerpt **

So does this mean even in DOCUMENT/LITERAL and WRAPPED/LITERAL kind of
wsdl we should have for an array type (e.g: public Point[] myPoints;)
a wsdl that reads as

<complexType name="ArrayOfPoint">
    <complexContent>
         <restriction base="soapenc:Array">
          <attribute ref="soapenc:arrayType" wsdl:arrayType="impl:Point[]"/>
         </restriction>
    </complexContent>
</complexType>

Currently in axis we get a wsdl fragment that looks like

<complexType name="ArrayOfPoint">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" name="item"
type="impl:Point"/>
    </sequence>
</complexType>

Which one is correct?
Any insight into this issue will be very much appreciated.

Thanks in advance
Jaya