Re: SOAP Encoding - Arrays

Comments in line,

Cheers
Simon
www.pocketsoap.com

On Tue, 5 Feb 2002 11:01:22 +0100 (CET), in soap you wrote:

> Simon, my replies are below. 8-)
>
>                   Jacek Kopecky
>
>                   Senior Architect, Systinet (formerly Idoox)
>                   http://www.systinet.com/
>
> > 5) in 3.1 rule 2, item 2 it says "the containing element instance is
> > itself contained within an element containing a (possibly defaulted)
> > enc:itemType attribute, " however part 1 rules out defaulted
> > attributes.
>
> 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."

> > 6) itemType seems redundant, everything it can do, can already be
> > achieved via schema types / xsi:type usage
>
> 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 ?

Received on Tuesday, 5 February 2002 12:01:13 UTC