Well, I have a partial answer to my question.  I looked through the source
code for the BeanSerializer.   What it seems to state is that in order to
skip the xsi:nil="true" bit and just omit that element is for the minOccurs
to be zero ( indicating that it is legal to skip it) and also that
soapEncoding is not used.  

So it seems that while Section 5 encoding would allow an element with a NULL
value to be omitted, Axis itself will not omit it while doing Section 5
encoding.  I am just SOL unless I want to muck with Axis source or switch to
'literal', rather than 'encoded'.

Would someone be able to clarify whether or not this is a correct
conclusion?
Laura



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2003 4:53 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: xsi:nil=true
> 
> 
> 
> Hi Laura,
> 
> Setting the minoccur to "0" will not have effect on xsi:nil='true'
> 
> minoccur defines how many minimum ocuurances of the element.
> 
> "{min occurs} determines the minimum number of such element 
> [children] that
> can occur. The number of such children must be greater than 
> or equal to
> {min occurs}. If {min occurs} is 0, then occurrence of such 
> children is
> optional."
> 
> while xsi:nil - true/flase defines whether that element can 
> have "null"
> value.
> 
> Even I had this query, how to get rid of xsi:nil="true" for 
> null elements.
> If you have gotten any useful responses please do share those.
> 
> best regards,
> Shrikant...
> 
> Optimyz Software, Inc.
> Email: [EMAIL PROTECTED]
> Web: www.optimyz.com
> 
> For more information about WebServiceTester product visit:
> http://www.optimyz.com
> 
> 
> Original Message:
> -----------------
> From: Slaybaugh Laura J IHMD [EMAIL PROTECTED]
> Date: Mon, 6 Oct 2003 16:00:15 -0400 
> To: [EMAIL PROTECTED]
> Subject: xsi:nil="true"
> 
> 
> Hello, 
> 
> I have an Axis client contacting a gsoap service, where one of the
> parameters is a bean with several fields.  For any null 
> fields in this bean,
> Axis adds a xsi:nil='true' reference.  Is there any way I 
> could turn this
> off, so that null fields are not included in the xml?  
> 
> I am just using the BeanSerializer, and for the 
> typeDecription of the bean,
> I have set each of the parameters to MinOccurs(0), but I 
> still seem to get
> xsi:nil='true' for everything.  Is there something else I 
> need to do?  Below
> is a portion of my soap body...
> 
> Thank you,
> Laura
> ...
> <item>
>      <tagInternalId xsi:nil="true"/>
>      <tagId>P400002070</tagId>
>      <status>0</status>
>      <temp>0</temp>
>      <humidity>0</humidity>
>      <data xsi:nil="true"/>
>      <limitFlags>0</limitFlags>
>      <notRespondingCnt>0</notRespondingCnt>
>      <tagdata xsi:nil="true"/>
>      <asset xsi:nil="true"/>
> </item>
> ...
> 
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> 
> 

Reply via email to