Re: [soapbuilders] root attribute default

Adding to what Yann said below, the interpretation of an element without a
SOAP-ENC:root attribute could to be a little different depending on whether
the element is an immediate child element of the SOAP Body or appears
elsewhere.  I recollect that the intention to allow this motivated the lack
of a specified default value.

Using section 5 serialization, the Body element will contain at most one
graph.  Hence, once one can make the simple assumption that the first
element with either SOAP-ENC:root='1' or the root attribute absent is the
root and all other peer elements must be non-roots.

However, for child elements of Headers or of any other element besides Body,
we do not know that only a single graph has been serialized.  There may be,
for example, several headers. Hence, we need explicit distinction between
roots and non-roots.  Assuming a default value of SOAP-ENC:root='1' is the
most straightforward.

Having said this about optimizing the Body case, I expect that we would end
up with a simpler and more reliable system overall if we just took the
default value of SOAP-ENC:root to be '1' in all cases.


----- Original Message -----
From: "Yann Christensen" <yannc@microsoft.com>
To: <soapbuilders@yahoogroups.com>
Sent: Tuesday, June 12, 2001 5:22 PM
Subject: RE: [soapbuilders] root attribute default


It would help if the spec for sect.5.6 more clearly defined some of the
terms it is using.

I'm using these:

"serialization root": any element that maps to a root of an object
graph.

"true serialization root": serialization root that is an immediate child
of body.

"root of an object graph": for RPC/Encoded style (section 5& 7) there is
only one object graph root. For Document/Encoded style you could have
multiple object graphs.


I believe the default value for the root attribute depends on the
location of the element. If it is an immediate child of body then the
default is "1", otherwise it is "0". In other words true serialization
roots have an implicit value of "1".

It seems that for RPC/Encoded all of the children of <body> except for
the method element or method response element should have root="0". This
is because their can only be one root and all the other children of
<body> must have root="0" to override the default of "1". However, I
believe earlier on this list a convention was adopted that a SOAP
processor would just search for the child of <body> that did not have a
root="0" to determine the single root and anything after that was
ignored. I don't have plans to enforce anything beyond that in my SOAP
implementation.

I'm not sure what the spec says about elements that are immediate
children of Envelope.



-----Original Message-----
From: Brian L. Matthews [mailto:blm@halcyon.com]
Sent: Tuesday, June 12, 2001 9:50 AM
To: soapbuilders@yahoogroups.com
Subject: Re: [soapbuilders] root attribute default

Paul,

>Spec says that root attribute does not have a default value (yet
>schema says that default is "0" which is not quite right, I believe).

I would agree.

>root="0" marks serialization root that is not a true root of an
>object graphs and root="1" marks true root of an object graph that is
>not a serialization root.

Actually root="1" labels roots that *aren't* true roots. True roots
have an implied root="1". Presumably there's some magical way to tell
which elements are true roots.

>Therefore there is not much sense to mark
>method element itself as root="1", because it's already serialization
>root

How does a general SOAP parser know this?

>And there should NOT be element NOT on root level marked with
>root="0".

Should there be an element on any level other than direct subelements
of Header or Body marked with root? Is it an error, or simply ignored?

Brian

To unsubscribe from this group, send an email to:
soapbuilders-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/



To unsubscribe from this group, send an email to:
soapbuilders-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

Received on Wednesday, 13 June 2001 07:35:54 UTC