You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Thallapragada, Sowmi" <So...@telenav.com> on 2009/05/07 20:34:58 UTC

[Axis2] Null array

I have a nillable object array in my schema. If I set this to NULL in my
service code, the client is getting an array with size 1, and the
element at index 0 is NULL. Is this the expected behavior? Shouldn't the
array itself be set to NULL?

 

- Sowmi

 

Sowmitra Thallapragada | TeleNav Inc. | +1 408 207 4116 |
sowmit@telenav.com | www.telenav.com

 


Re: [Axis2] Null array

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
I'm not sure what Martin meant in his reply. This sounds like it's an 
ADB-specific problem. Assuming the schema is along these lines:

  <xs:element name="wrapper" nillable="true">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="item" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

the expected handling would be to generate <wrapper xsi:nil="true"/> 
when the array is null. If ADB is not doing this it should be considered 
a bug. Likewise on input, if the XML contains <wrapper xsi:nil="true"/> 
the unmarshalled array should be set to null. I believe JiBX handles 
this case as expected.

  - Dennis

-- 
Dennis M. Sosnoski
Java XML and Web Services
Axis2 Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



Nora Serinek wrote:
> And for ADB binding? (Where the same problem occurs)
>
>
> Am Donnerstag, den 07.05.2009, 15:28 -0400 schrieb Martin Gainty:
>> for non-ADB databinding use minOccurs="0" e.g.
>> <xsd:element minOccurs="0" .../>
>>
>> Martin
>> ______________________________________________
>> Disclaimer and Confidentiality/Verzicht und 
>> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>> This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>>     
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> Subject: [Axis2] Null array
>> Date: Thu, 7 May 2009 11:34:58 -0700
>> From: Sowmit@telenav.com
>> To: axis-user@ws.apache.org
>>
>> I have a nillable object array in my schema. If I set this to NULL in 
>> my service code, the client is getting an array with size 1, and the 
>> element at index 0 is NULL. Is this the expected behavior? Shouldn’t 
>> the array itself be set to NULL?
>>
>>  
>>
>> - Sowmi
>>
>>  
>>
>> *Sowmitra Thallapragada | TeleNav Inc. | +1 408 207 4116 | 
>> sowmit@telenav.com | www.telenav.com*
>>
>>  
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> Windows Live™: Keep your life in sync. Check it out. 
>> <http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009> 
> ###########################################
> This e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this e-mail in error please notify
> the system manager.

RE: [Axis2] Null array

Posted by Nora Serinek <ns...@berlin-sws.de>.
And for ADB binding? (Where the same problem occurs)


Am Donnerstag, den 07.05.2009, 15:28 -0400 schrieb Martin Gainty:

> for non-ADB databinding use minOccurs="0" e.g.
> <xsd:element minOccurs="0" .../>
> 
> Martin 
> ______________________________________________ 
> Disclaimer and Confidentiality/Verzicht und
> Vertraulichkeitanmerkung/Note de déni et de confidentialité
> 
> This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
> 
> 
> 
> ______________________________________________________________________
> Subject: [Axis2] Null array
> Date: Thu, 7 May 2009 11:34:58 -0700
> From: Sowmit@telenav.com
> To: axis-user@ws.apache.org
> 
> 
> I have a nillable object array in my schema. If I set this to NULL in
> my service code, the client is getting an array with size 1, and the
> element at index 0 is NULL. Is this the expected behavior? Shouldn’t
> the array itself be set to NULL?
> 
>  
> 
> - Sowmi
> 
>  
> 
> Sowmitra Thallapragada | TeleNav Inc. | +1 408 207 4116 |
> sowmit@telenav.com | www.telenav.com
> 
>  
> 
> 
> 
> 
> 
> ______________________________________________________________________
> Windows Live™: Keep your life in sync. Check it out.
###########################################
This e-mail and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. If you have received this e-mail in error please notify 
the system manager.

RE: [Axis2] Null array

Posted by Martin Gainty <mg...@hotmail.com>.
for non-ADB databinding use minOccurs="0" e.g.
<xsd:element minOccurs="0" .../>

Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




Subject: [Axis2] Null array
Date: Thu, 7 May 2009 11:34:58 -0700
From: Sowmit@telenav.com
To: axis-user@ws.apache.org
















I have a nillable object array in my schema. If I set this
to NULL in my service code, the client is getting an array with size 1, and the
element at index 0 is NULL. Is this the expected behavior? Shouldn’t the
array itself be set to NULL?

 

- Sowmi

 

Sowmitra Thallapragada |
TeleNav Inc. | +1 408 207 4116 | sowmit@telenav.com | www.telenav.com

 


_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009