Re: SOAP Encoding - Arrays

 Simon, please see my replies in line.

                   Jacek Kopecky

                   Senior Architect, Systinet (formerly Idoox)
                   http://www.systinet.com/



On Tue, 5 Feb 2002, Simon Fell wrote:

 > > Part 1 rules out defaulted attributes for the attributes it 
 > >specifies, i.e. actor and mustUnderstand and encodingStyle, I 
 > >think. IMO Encoding can allow defaulted attributes because it is 
 > >an extension of SOAP. I doubt SOAP can forbid every extension and 
 > >application to use defaulted attributes.
 > 
 > Part 1 [section 3.1] is pretty clearly referring to the whole message
 > "A SOAP message MUST NOT impose any XML schema processing (assessment
 > and validation) requirement on the part of any receiving SOAP node.
 > Therefore, SOAP REQUIRES that all attribute information items, whether
 > specified in this specification or whether they belong to a foreign
 > namespace be caried in the serialized SOAP envelope."

Hmmm, I think you got a point here, one I don't know how to 
solve.

 > > In fact, itemType can be helpful if you don't use a schema and 
 > >you receive an array and you want to start deserializing it, 
 > >especially if the array members are polymorph - it would be 
 > >necessary to read the whole XML representation of the array in 
 > >memory before you knew the supertype of the array members. BTW, 
 > >use of itemType is optional. 8-)
 > 
 > whether you're using a Schema or not is irrelevant, SOAP allows for
 > type information to be in external metadata, that metadata can convey
 > array item type information just as well other type information, why
 > make things more complex having that information optionally in the
 > message in a non-standard way. Its just as easy to say
 > <foo><item>5</item></foo> and have metadata that says foo is an array
 > of xsd:int as <foo>5</foo> and have metadata that say's foo is an
 > xsd:int, what's the difference ?

SOAP does indeed allow for type information to be in external 
metadata, but it does not require that nodes be able to handle 
such metadata. In a node that does not follow a schema (nor any 
other kind of such metadata) the itemType attribute may be 
useful, as described above. It is not even much of a burden for 
the receiver because it need not support this attribute.

I'm all for removing stuff that does cause unnecessary burden on 
some communicating parties, in this case I think the criterion is 
not met.

Jacek

Received on Wednesday, 6 February 2002 04:23:56 UTC