axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Created: (AXIS-1376) WSDL-generated client can't handle arrays of length 1
Date Mon, 31 May 2004 17:21:00 GMT

  A new issue has been created in JIRA.

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: Unassigned
   Priority: Major

    Project: Axis
             1.2 Beta

   Reporter: Nelson Minar

    Created: Mon, 31 May 2004 10:20 AM
    Updated: Mon, 31 May 2004 10:20 AM

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