OK, now I remember,  the default is Integer:

<element minOccurs="1" maxOccurs="1" name="QuantidadeItemConsumido" type="xsd:int"/>

On both the client and the service that maps to Integer for me using xmlbeans. Although that might be a java 5.0 feature. And nillable == false is to get an int instead of Integer.

Sorry if that doesn't help, I remebered wrong on my last post.
 
Robert
http://www.braziloutsource.com/

On 5/24/06, robert lazarski <[EMAIL PROTECTED] > wrote:
Isn't it Nillable == false to switch the primitive to an Object?

<xsd:element name="myInteger" type="xsd:int" nillable="false" />
HTH,
Robert
http://www.braziloutsource.com/



On 5/24/06, Dan Washusen <[EMAIL PROTECTED] > wrote:
Actually, changing it to xsd:integer doesn't work... it seems like axis is ignoring the xsi:nil?


On 5/24/06, Dan Washusen < [EMAIL PROTECTED]> wrote:
Hi All,
I'm attempting to run the Axis2 AntCodegenTask ant task to generate my Objects based on a schema.  The element in question is specified as:

<xsd:complexType name="ClientDetailsType">
    <xsd:sequence>
      <xsd:element name="cmtAccount1Id" type="xsd:long" nillable="true" />
    </xsd:sequence>
  </xsd:complexType>

When I run the ant task the ClientDetailsType class is generated with the cmtAccount1Id attribute as a primitive long and throws a NumberFormatException when I try and invoke the web service and the cmtAccount1Id is nil.  If I change the type from "xsd:long" to "xsd:integer" the BigInteger java type is used and it works...

Am I missing something?  Why is the primitive long being used if the element is specified as nillable?

Cheers,
Dan




Reply via email to