axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Washusen" <dan.washu...@gmail.com>
Subject Re: AntCodegenTask mapping xsd:long to java primitive long?
Date Thu, 25 May 2006 00:40:25 GMT
Your suggestion helped although probably not in the way you expected... I
switched to xmlbeans and it's working as expected...

On 5/25/06, robert lazarski <robertlazarski@gmail.com> wrote:
>
> 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 <robertlazarski@gmail.com > 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 <dan.washusen@gmail.com > 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 < dan.washusen@gmail.com> 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
> > > >
> > >
> > >
> >
>

Mime
View raw message