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 Leonhard Holzer <le...@hotmail.de> on 2007/07/05 17:38:33 UTC
wsdl2java mapping
Hello list,I am using an axis2 web service with complex return types. The return type of one operation is of the type xs:int nillable=true.When I run the wsdl2java tool I get an mapping to java int type which is not working well with null values. I read that basic types with nillable=true should be mapped to the wrapper classes (Integer, Double etc.). Why is it not working?The wsdl file is geerated automatically from the axis2 application. How can I configure wsdl2java to map xs:int to Integer?Thanks for your help Leonhard
_________________________________________________________________
Testen Sie Live.com - das Zentrum Ihrer Online-Welt, das Sie mit aktuellen Nachrichten, Sport- und Wetterinfos und vielem mehr versorgt.
http://www.live.com/getstarted
Re: wsdl2java mapping
Posted by Amila Suriarachchi <am...@gmail.com>.
well I think you are talking about adb. (this is the defult databinding for
axis2)
if you want to set null value to int set Integer.MIN_VALUE to in
eg.
i = Integer.MIN_VALUE would serialize it correctly. on the other hand if you
receive an null int
you corresponding int varaible is set to Integer.MIN_VALUE.
for short, long, byte use the MIN_VALUE
and for float and double use NaN (e.g. Double.NaN)
Amila.
On 7/6/07, Anne Thomas Manes <at...@gmail.com> wrote:
>
> Try wrapping the return value in a wrapper element, e.g:
>
> <ns:returnWrapper xmlns:ns="urn:foo:bar">
> <ns:return nil="true"/>
> </ns:returnWrapper>
>
> Anne
>
> On 7/5/07, Leonhard Holzer <le...@hotmail.de> wrote:
> >
> > Hello list,
> >
> > I am using an axis2 web service with complex return types.
> > The return type of one operation is of the type xs:int nillable=true.
> >
> > When I run the wsdl2java tool I get an mapping to java int type which is
> not
> > working well with null values. I read that basic types with
> nillable=true
> > should be mapped to the wrapper classes (Integer, Double etc.). Why is
> it
> > not working?
> >
> > The wsdl file is geerated automatically from the axis2 application. How
> can
> > I configure wsdl2java to map xs:int to Integer?
> >
> > Thanks for your help
> > Leonhard
> >
> >
> > ________________________________
> > Kostenlos bloggen + eigene Homepage + Fotospeicher = MSN Spaces
> Kostenlos!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Amila Suriarachchi,
WSO2 Inc.
Re: wsdl2java mapping
Posted by Anne Thomas Manes <at...@gmail.com>.
Try wrapping the return value in a wrapper element, e.g:
<ns:returnWrapper xmlns:ns="urn:foo:bar">
<ns:return nil="true"/>
</ns:returnWrapper>
Anne
On 7/5/07, Leonhard Holzer <le...@hotmail.de> wrote:
>
> Hello list,
>
> I am using an axis2 web service with complex return types.
> The return type of one operation is of the type xs:int nillable=true.
>
> When I run the wsdl2java tool I get an mapping to java int type which is not
> working well with null values. I read that basic types with nillable=true
> should be mapped to the wrapper classes (Integer, Double etc.). Why is it
> not working?
>
> The wsdl file is geerated automatically from the axis2 application. How can
> I configure wsdl2java to map xs:int to Integer?
>
> Thanks for your help
> Leonhard
>
>
> ________________________________
> Kostenlos bloggen + eigene Homepage + Fotospeicher = MSN Spaces Kostenlos!
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org