Not necessarily, BarZ -- have a look at java.lang.Boolean, which of course is a class,
therefore an object of that type can be null as well! :D
Liv
Liviu Tudor
Cimage Novasoft Limited
www.cimagenovasoft.com
[EMAIL PROTECTED]
Fax: +44 (0)1344 767701
Direct Line: +44 (0)1344 767759
Centennial Court, Easthampstead Road, Bracknell, BERKS, RG12 1JZ
end user v. A command unfortunately not implemented in most systems.
-----Original Message-----
From: Barzilai Spinak [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 3:26 PM
To: [EMAIL PROTECTED]
Subject: Re: Maintaining index for Arrays with null values
Where I live, a boolean value can only be true or false. It's bi-state.
null/true/false would be a tri-state kind of variable with a whole
different algebra :-)
In particular to Java, a boolean variable can only be true or false so
of course you
won't be able to deserialize a null into a boolean.
BarZ
sreekantan, vijay wrote:
> I am getting differing behavior between serialization and
> deserialization with axis.
> Here is the scenario,
> I am using the following structure to represent an ArrayOfBoolean
> values. Please notice the nillable="true", so the
> elements can be null.
>
>
> <xsd:complexType name="ArrayOfBoolean">
> <xsd:complexContent>
> <xsd:sequence>
> <xsd:element
> name="a"
> type="xsd:boolean"
> minOccurs="0"
> maxOccurs="unbounded"
> nillable="true"
> />
> </xsd:sequence>
> </xsd:complexContent>
> </xsd:complexType>
>
> Now here is the SOAP data that gets gets serialized for
> a{null,true,null,true}.
>
> <a xsi:nil="true"/>
> <a>true</a>
> <a xsi:nil="true"/>
> <a>true</a>
> This is done by the Axis BeanSerializer.
>
>
> I am serializing / deserializing this to a boolean array using axis.
>
> During deserialization, I am thinking I should get back a boolean
> array of size 4, with elements 0 and 2 null and 1 and
> 4 false.
>
> Now because of this fastpath nil check returning null in
> BeanDeserializer, my indexing gets lost.
> // Fastpath nil checks...
> if (context.isNil(attributes))
> return null;
> I get an array of size 2 with both elements true.
>
>
> I think this should not be the case. I feel if serialization writes
> out xsi:nil="true" for a null element,
> deserialization should also set back the value as null, so as to
> maintain indexing.
>
> I looked at Axis 1.2, same code. I am getting the latest build to see
> if anything has changed.
>
> Your views on this is greatly appreciated.
> If anyone feels this is appropriate for the axis-dev list, do let me
> know too.
> Regards
> Vijay
>
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> <http://taxes.yahoo.com/filing.html>
Nueva forma de conectarse a internet en URUGUAY
------------- Cuanto gasta hoy ? --------------
Tel. 0909.20.30 => Acceso 100% digital 56K!
Promocion lanzamiento: $0,10 mas IVA el minuto.
===============================================
http://www.internet.com.uy - Internet en serio.