Actually, the call.setReturnClass() method removes the need for the convert() (that's 
the whole point of that method).

Vaishakhi, are you sure your service is actually returning a SOAP array?  Also, you 
need to specify both the return type and the return class, I believe.

--Glen

> -----Original Message-----
> From: Vidyanand Murunikkara [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 19, 2002 3:16 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Class Cast Exception using return type as List
> 
> 
> Hi 
> 
> I remember someone mentioning in the list that for List/Vector the
> return value from the call.invoke(...) is an object array.
> To convert it to some thing that u want u would use the convert method
> in org.apache.axis.utils.JavaUtils.
> 
> Hope this helps
> Vidyanand
> 
> 
> 
> -----Original Message-----
> From: Vaishakhi Ajmera [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 19, 2002 11:17 AM
> To: [EMAIL PROTECTED]
> Subject: Class Cast Exception using return type as List
> 
> 
> I have followed the instructions in the mailing lists and used these
> options
> to get a List as return type from a web service
> 
> call.setReturnClass ( java.util.List.class)
> List ls = (List)call.invoke( new Object[] {} );
> 
> or
> 
> call.setReturnType( XMLType.SOAP_ARRAY);
> ArrayList ls = (ArrayList)call.invoke( new Object[] {} );
> 
> Both the above combination of statements give me a
> java.lang.ClassCastException: [Ljava.lang.Object;
> .
> How should I go about then to get a java.util.List as return type from
> my
> webservice.
> 
> Thanks
> Vaishakhi
> 
> 

Reply via email to