if the minOccurs="0" that attribute can be null.
if you care fully look at your code,
the code segment you have withing this if statement.
} if (localItemCodeTracker){
so that code segment execute only if localItemCodeTracker is ture.
Here how the localItemCodeTracker is set.
if (param != null){
//update the setting tracker
localItemCodeTracker = true;
} else {
localItemCodeTracker = false;
}
so if the param == null the localItemCodeTracker is false and nothing
happens. i.e no element send means
it takes the minOccurs="0"
Try with some sample values.
thanks,
Amila.
On Wed, Jun 18, 2008 at 6:31 PM, Tim James McConechy <
[EMAIL PROTECTED]> wrote:
> Here is the WSDL, not sure what you mean by the comment "this should be
> the generated code".
>
> Thanks Though
>
>
> ------------------------------
>
> *From:* Amila Suriarachchi [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, June 18, 2008 5:42 AM
> *To:* [email protected]
> *Subject:* Re: Axis Generates All Fields Not Nullable
>
>
>
> Can you send your wsdl? this should be be the generated code.
>
> thanks,
> Amila.
>
> On Wed, Jun 18, 2008 at 1:04 AM, Tim James McConechy <
> [EMAIL PROTECTED]> wrote:
>
> Hi,
>
> When I run wsdl2java from a .NET 1.1 web service axis adds code such as:
>
>
>
> if (localitemCode ==null){
>
> // write the nil attribute
>
> throw new org.apache.axis2.databinding.ADBException("itemCode cannot be
> null!!");
>
>
>
> The WSDL looks like:
>
>
>
> <s:element minOccurs="0" maxOccurs="1" name="itemCode" type="s:string"/>
>
>
>
> Why does it generate the field as required? Can I make it not do this?
> Previously on axis 1.4 I would change setNillable(false) to
> setNillable(true).
>
>
>
> Thanks in advance
>
> Tim McConechy | Principal Software Engineer | *Infor *| Office:
> 610.407.8191 | Mobile: 610.306.6603 | [EMAIL PROTECTED]
>
>
>
>
>
>
> --
> Amila Suriarachchi,
> WSO2 Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Amila Suriarachchi,
WSO2 Inc.