axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13602] New: - array bug in response XML document
Date Mon, 14 Oct 2002 13:45:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13602>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13602

array bug in response XML document

           Summary: array bug in response XML document
           Product: Axis
           Version: 1.0-rc2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@xml.apache.org
        ReportedBy: psorin@regens.hu


Hi,

if we invoke a Web Service method which has as its return type a certain custom 
class, and that class contains a member which is an array (of a custom or 
primitive type), then the response SOAP document is wrongly formed.

Example:

Let's assume thet we have the following two classes:

class Buri1 {
  public String a;
  public Buri2[] arr;
}

class Buri2 {
  public String s;
}


and we have the following WS method on a SOAP server:

Buri1 BuriMethod(Buri1 b) {
   Buri1 ret = new Buri1();
   b1 = b;
   return ret;
}


and let's assume that we call this method, after putting several Buri2's in the 
arr field of the parameter b.

As I have observed, in such cases, in the response SOAP message the array of 
Buri2's does not appear as an array of Buri2's, instead it appears as n 
distinct Buri2's, so where the client expects an array of Buri2's, it gets only 
a Buri2, that's why it writes out the following error message or a similar 
one: "could not convert Buri2 to Buri2[]".

I would mention that this error appears only in such a case, it works fine if 
the return type of the WS method is an array of Buri2's. I would also like to 
mention that I can avoid this bug by making a getter/setter method pair for the 
array of Buri2's member (arr) in Buri1. Then the response XML is formed 
correctly, there appears the array of Buri2's! Nevertheless, I think it would 
be possible and desirable that this bug be fixed, to not be forced to use 
getter/setter methods for array members if someone doesn't want to (it already 
works fine if the a WS method parameter contains an array or the return type of 
the WS method is an array, so one more little step and it will hopefully also 
work fine when the return type of the WS method contains an array). 

Thanks.

Mime
View raw message