OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp-interop message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [wsrp-interop] SAP Consumer interaction with other Producers







Rich Thompson <richt2@us.ibm.com> wrote on 03/15/2004 09:56:41 PM:

>
> I never understood what the distinction schema was trying to make
> was good for. I suspect Microsoft was once of those pushing to drop
> the distinction and therefore internally did not handle them as
different.
>
> Rich
>

Well there is one like an explicit NULL in databases.
When we look at the object model there basically is no distinction. Both
ommitted elements and "nil=true" elements are set to "null" in an object
model when deserializing.
Example (this applies to other languages like .Net, C++, too):

class A {
      private B b;
      private C c;
}

When receiving a message like

<a>
  <b nil="true"/b>
</a>

we get an instance a of class A with b and c set to "null".

However the distinction in "nil=true" and ommitting an accessor lies in the
default value behaviour.
When ommitting an accessor the value of that element may be set to a
default value or null.
When setting "nil=true" the value is explictly set to null.

The dafault behaviour can be defined in schema or may be context dependant.
For example a default for a boolean value may be "false" (and this is
definitly something else than "null", i.e. "unknown"), or "0" for an
integer value.

This is defined in SOAP 1.1 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/
section 5.1 (serialization rules):
"A NULL value or a default value MAY be represented by omission of the
accessor element. A NULL value MAY also be indicated by an accessor element
containing the attribute xsi:null with value '1' or possibly other
application-dependent attributes and values. "

and

section 5.5 (default values):
"An omitted accessor element implies either a default value or that no
value is known. The specifics depend on the accessor, method, and its
context. For example, an omitted accessor typically implies a Null value
for polymorphic accessors (with the exact meaning of Null
accessor-dependent). Likewise, an omitted Boolean accessor typically
implies either a False value or that no value is known, and an omitted
numeric accessor typically implies either that the value is zero or that no
value is known. "

So when looking at Yossi's comment (or better the SOAP 1.2 statement) it
seems they dropped the default behaviour?
I'm a little bit confused here.

Richard



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]