Re: [SOAP Encoding Issue] Support for XML Schema Types

This causes some difficulty for code generation. What is a code generator to generate for an anonymous type? If it
simply generates a random name then how is the developer to know which generated language type maps to which anonymous
schema type. I don't really see the usefulness of this apart from to say that support for XML types is complete.

I sent a mail some time ago to soapbuilders about other language mapping difficulties such as restriction of complex
types and substitution groups. Should these also be raised as issues of how they should be supported in SOAP? Perhaps we
should just accept that SOAP requires some restrictions placed on what is available from XML Schema to make it usable
and interoperable?

Pete

Asir S Vedamuthu wrote:
> 
> Issue
> 
> Part 2, section 4.1 'Rules for Encoding Types in XML' [1], rule 8 says that
> "SOAP arrays MUST contain a enc:arrayType attribute whose value specifies
> the type of the contained elements as well as the dimension(s) of the array"
> Plus,
> 
> Part 2, section 4.1 'Rules for Encoding Types in XML' [1], rule 2 says that
> "MUST .. the containing element instance is itself contained within an
> element containing a (possibly defaulted) enc:arrayType attribute or "
> 
> In brief, an array MUST contain an enc:arrayType attribute. And, this
> attribute specifies the type and other related information. Here is a sample
> schema for SOAP array,
> 
> [line 01] <xs:element name="ArrayOfPhoneNumbers"
> [line 02]    type="tns:ArrayOfPhoneNumbersType" />
> [line 03]
> [line 04] <xs:complexType name="ArrayOfPhoneNumbersType" >
> [line 05]   <xs:complexContent>
> [line 06]     <xs:restriction base="enc:Array" >
> [line 07]       <xs:sequence>
> [line 08]        <xs:element name="phoneNumber" maxOccurs="unbounded">
> [line 09]            <xs:simpleType>
> [line 11]             <xs:restriction base="xs:string" />
> [line 12]            </xs:simpleType>
> [line 13]        </xs:element>
> [line 14]       </xs:sequence>
> [line 15]       <xs:attributeGroup ref="enc:arrayAttributes" />
> [line 16]       <xs:attributeGroup ref="enc:commonAttributes" />
> [line 17]     </xs:restriction>
> [line 18]   </xs:complexContent>
> [line 19] </xs:complexType>
> 
> In lines 9 thru 12, I have an anonymous simple type. In this case, this
> simple type does not have a name. This means, it is not possible to compute
> the value of enc:arrayType attribute.
> 
> XML Schema types can be broadly classified into two categories: named types
> and anonymous types. Using this example, I demonstrated that the SOAP
> encoding does not consider anonymous types as first class types. And, in
> general, not just the array, SOAP encoding does not consider anonymous types
> as first class types 'cos it is not possible to compute the value of
> xsi:type attribute either.
> 
> FYI, support for XML Schema types is covered by R401. Requirement R401
> states that the XMLP data representation must support using XML Schema
> simple and complex types [2].
> 
> I request the ETF to investigate and provide a solution.
> 
> BTW, this is a re-post of my e-mail dated August 6th, 2001 [3]
> 
> [1] http://www.w3.org/TR/2001/WD-soap12-part2-20011002/#encrules
> [2] http://www.w3.org/TR/2001/WD-xmlp-reqs-20010319/#z401
> [3] http://lists.w3.org/Archives/Public/xml-dist-app/2001Aug/0058.html
> 
> Regards,
> 
> Asir S Vedamuthu
> 
> webMethods, Inc.
> 703-460-2513 or asirv@webmethods.com
> http://www.webmethods.com/

Received on Wednesday, 24 October 2001 10:25:59 UTC