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 Mikael Uvebrandt <mu...@yahoo.se> on 2003/06/06 16:11:46 UTC

Integer[] --> int[]

I have a method in my WS that takes an Integer[] array
as one of its arguments. When I generate client side
classes in Axis 1.1RC2 (actually JBuilder8 does it for
me using WSDL2Java), that Integer[] has been converted
to an int[]. I found a bug report on this
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17554)
where someone says this won't and can't be fixed. I
might be able to accept that if it wasn't for the fact
that I get different behaviour depending on what Axis
version I use. When using the Axis version included in
JBoss 3.0.6 (I think it's 1.0 something), the
Integer[] type is preserved on the client.

This is part of the WSDL that is generated in JBoss
3.2.1 (which I'm pretty sure uses Axis 1.1RC2). This
shows up as an int[] on the client:

<complexType name="ArrayOf_xsd_int">
  <complexContent>
    <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType"
wsdl:arrayType="xsd:int[]" /> 
    </restriction>
  </complexContent>
</complexType>

And this WSDL is from JBoss 3.0.6, which correctly
produces Integer[] on the client side:

<complexType name="ArrayOf_xsd_int">
  <complexContent>
    <restriction base="SOAP-ENC:Array">
      <attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="SOAP-ENC:int[]" /> 
    </restriction>
  </complexContent>
</complexType>


Can anyone shed some light on this issue? Should I
stop using Integer[] and similar types, or is there
another way of preserving that type on the client?

Thanks in advance,
Mikael

_____________________________________________________
Gå före i kön och få din sajt värderad på nolltid med Yahoo! Express
Se mer på: http://se.docs.yahoo.com/info/express/help/index.html

Re: Integer[] --> int[]

Posted by Mikael Uvebrandt <mu...@yahoo.se>.
Thanks for your help, Costas! I think I'll follow the
advice you got and steer clear of the wrappers. It
will cause a fair bit of trouble on my end to change
the interfaces, but given what I've read about the
issue so far it seems that it's definitely the safest
way to go. 

/Mikael

 --- Costas Polychronopoulos <co...@b-online.gr>
wrote: 
> Hi Mikael!
> 
> I had the same problem with my service and opened up
> a thread some time
> earlier. What I was adviced was to stay away from
> wrapper objects. For more
> info check:
>
http://marc.theaimsgroup.com/?l=axis-user&m=104965962522104&w=2
> Any thoughts about it are welcome.
> 
> Regards,
> Costas
> 
> 
> ----- Original Message -----
> From: "Mikael Uvebrandt" <mu...@yahoo.se>
> To: <ax...@ws.apache.org>
> Sent: Friday, June 06, 2003 5:11 PM
> Subject: Integer[] --> int[]
> 
> 
> I have a method in my WS that takes an Integer[]
> array
> as one of its arguments. When I generate client side
> classes in Axis 1.1RC2 (actually JBuilder8 does it
> for
> me using WSDL2Java), that Integer[] has been
> converted
> to an int[]. I found a bug report on this
>
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17554)
> where someone says this won't and can't be fixed. I
> might be able to accept that if it wasn't for the
> fact
> that I get different behaviour depending on what
> Axis
> version I use. When using the Axis version included
> in
> JBoss 3.0.6 (I think it's 1.0 something), the
> Integer[] type is preserved on the client.
> 
> This is part of the WSDL that is generated in JBoss
> 3.2.1 (which I'm pretty sure uses Axis 1.1RC2). This
> shows up as an int[] on the client:
> 
> <complexType name="ArrayOf_xsd_int">
>   <complexContent>
>     <restriction base="soapenc:Array">
>       <attribute ref="soapenc:arrayType"
> wsdl:arrayType="xsd:int[]" />
>     </restriction>
>   </complexContent>
> </complexType>
> 
> And this WSDL is from JBoss 3.0.6, which correctly
> produces Integer[] on the client side:
> 
> <complexType name="ArrayOf_xsd_int">
>   <complexContent>
>     <restriction base="SOAP-ENC:Array">
>       <attribute ref="SOAP-ENC:arrayType"
> wsdl:arrayType="SOAP-ENC:int[]" />
>     </restriction>
>   </complexContent>
> </complexType>
> 
> 
> Can anyone shed some light on this issue? Should I
> stop using Integer[] and similar types, or is there
> another way of preserving that type on the client?
> 
> Thanks in advance,
> Mikael


_____________________________________________________
Gå före i kön och få din sajt värderad på nolltid med Yahoo! Express
Se mer på: http://se.docs.yahoo.com/info/express/help/index.html

Re: Integer[] --> int[]

Posted by Costas Polychronopoulos <co...@b-online.gr>.
Hi Mikael!

I had the same problem with my service and opened up a thread some time
earlier. What I was adviced was to stay away from wrapper objects. For more
info check: http://marc.theaimsgroup.com/?l=axis-user&m=104965962522104&w=2
Any thoughts about it are welcome.

Regards,
Costas


----- Original Message -----
From: "Mikael Uvebrandt" <mu...@yahoo.se>
To: <ax...@ws.apache.org>
Sent: Friday, June 06, 2003 5:11 PM
Subject: Integer[] --> int[]


I have a method in my WS that takes an Integer[] array
as one of its arguments. When I generate client side
classes in Axis 1.1RC2 (actually JBuilder8 does it for
me using WSDL2Java), that Integer[] has been converted
to an int[]. I found a bug report on this
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17554)
where someone says this won't and can't be fixed. I
might be able to accept that if it wasn't for the fact
that I get different behaviour depending on what Axis
version I use. When using the Axis version included in
JBoss 3.0.6 (I think it's 1.0 something), the
Integer[] type is preserved on the client.

This is part of the WSDL that is generated in JBoss
3.2.1 (which I'm pretty sure uses Axis 1.1RC2). This
shows up as an int[] on the client:

<complexType name="ArrayOf_xsd_int">
  <complexContent>
    <restriction base="soapenc:Array">
      <attribute ref="soapenc:arrayType"
wsdl:arrayType="xsd:int[]" />
    </restriction>
  </complexContent>
</complexType>

And this WSDL is from JBoss 3.0.6, which correctly
produces Integer[] on the client side:

<complexType name="ArrayOf_xsd_int">
  <complexContent>
    <restriction base="SOAP-ENC:Array">
      <attribute ref="SOAP-ENC:arrayType"
wsdl:arrayType="SOAP-ENC:int[]" />
    </restriction>
  </complexContent>
</complexType>


Can anyone shed some light on this issue? Should I
stop using Integer[] and similar types, or is there
another way of preserving that type on the client?

Thanks in advance,
Mikael

_____________________________________________________
Gå före i kön och få din sajt värderad på nolltid med Yahoo! Express
Se mer på: http://se.docs.yahoo.com/info/express/help/index.html