axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Commented: (AXIS-1376) WSDL-generated client can't handle arrays of length 1
Date Sun, 01 Aug 2004 22:08:42 GMT
The following comment has been added to this issue:

     Author: Nelson Minar
    Created: Sun, 1 Aug 2004 3:08 PM
No, this bug is not fixed - I just tested with 2004-08-01 CVS.

I can't reopen the bug in Jira, near as I can tell, so I filed a new bug:

View this comment:

View the issue:

Here is an overview of the issue:
        Key: AXIS-1376
    Summary: WSDL-generated client can't handle arrays of length 1
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Axis
             1.2 Beta

   Reporter: Nelson Minar

    Created: Mon, 31 May 2004 10:20 AM
    Updated: Sun, 1 Aug 2004 3:08 PM

I have a document/literal wrapped Axis service. It returns an int []. Sometimes that array
is of length 1.

I generated an Axis client from the WSDL. The signature of the client method is
  public int[] getFoo(int bar);

If I call this method on the client and the server returns an array of length 1, I get a ClassCastException
on this line of generated code:
  return (int[]) org.apache.axis.utils.JavaUtils.convert(_resp, i\
it works fine with longer arrays.

I suspect that somewhere earlier in the deserialization Axis guessed that the object was not
an int [], but a plain int instead. Two suggested fixes:

Hack JavaUtils.convert() to deal with coverting int -> int[1] when needed.
Modify Axis' deserialization strategy so it uses the type information in the WSDL to construct
the objects.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message