You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by John Mani <jo...@sixthdimension.com> on 2002/01/04 00:17:24 UTC
returning null object
Java APIs that return Java objects sometimes return null to signify certain
conditions (like lack of data)
Does SOAP allow for such scenarios - i.e., a null representation of an
object ?
If so, does Apache SOAP allow this ?
thanx
-john
Re: returning null object
Posted by Chris Malley <cm...@pixelzoom.com>.
See the SOAP 1.2 spec at http://www.w3.org/TR/2001/WD-soap12-20010709.
As stated towards the end of Section 5.1:
"9. 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."
So the treatment of 'null' is left up to the implementation,
since "MAY" indicates that these are only suggestions.
I believe that Apache SOAP 2.2 takes the 'xsi:null' approach.
-Chris
John Mani wrote:
>
> Java APIs that return Java objects sometimes return null to signify certain
> conditions (like lack of data)
> Does SOAP allow for such scenarios - i.e., a null representation of an
> object ?
>
> If so, does Apache SOAP allow this ?
>
> thanx
> -john
Re: returning null object
Posted by Chris Malley <cm...@pixelzoom.com>.
See the SOAP 1.2 spec at http://www.w3.org/TR/2001/WD-soap12-20010709.
As stated towards the end of Section 5.1:
"9. 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."
So the treatment of 'null' is left up to the implementation,
since "MAY" indicates that these are only suggestions.
I believe that Apache SOAP 2.2 takes the 'xsi:null' approach.
-Chris
John Mani wrote:
>
> Java APIs that return Java objects sometimes return null to signify certain
> conditions (like lack of data)
> Does SOAP allow for such scenarios - i.e., a null representation of an
> object ?
>
> If so, does Apache SOAP allow this ?
>
> thanx
> -john