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 Vaishakhi Ajmera <va...@ardec.com> on 2002/04/19 20:16:35 UTC

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



Re: how to implement sessions, persistent objects, etc. ?

Posted by Stan Jordan <sk...@worldnet.att.net>.
Andrew...
Look in the archives for this thread:  "stateful web services" 4/2/02.  I
posted an example showing how to make the service stateful for each client
session.
Good luck.
Stan

----- Original Message -----
From: "Andrew Vardeman" <an...@iastate.edu>
To: <ax...@xml.apache.org>
Sent: Friday, April 19, 2002 12:44 PM
Subject: how to implement sessions, persistent objects, etc. ?


> Hi folks.
>
> My supervisor and I are hoping to use SOAP for communications between a
> handheld data collection instrument and the server where the data are
> stored.  For this we need a dialogue between the handheld and the server
> that will last for more than one request/response.  If I understand Axis
> properly, each request is an island.  How do I persist session data?  Or,
> suppose I want the server to send two messages for every one sent by the
> client.  Or, say I want to fire off an arbitrary number of status messages
> as I process the client's request.  Is there any way (other than writing a
> separate program and having Axis communicate with it, which seems to
defeat
> the whole purpose of Axis) to keep a process running that is specific to
> one client's session?  Is it possible for the server to send "responses"
> without the associated requests?
>
> Does that make any sense?
>
> Andrew
>
>
>


how to implement sessions, persistent objects, etc. ?

Posted by Andrew Vardeman <an...@iastate.edu>.
Hi folks.

My supervisor and I are hoping to use SOAP for communications between a 
handheld data collection instrument and the server where the data are 
stored.  For this we need a dialogue between the handheld and the server 
that will last for more than one request/response.  If I understand Axis 
properly, each request is an island.  How do I persist session data?  Or, 
suppose I want the server to send two messages for every one sent by the 
client.  Or, say I want to fire off an arbitrary number of status messages 
as I process the client's request.  Is there any way (other than writing a 
separate program and having Axis communicate with it, which seems to defeat 
the whole purpose of Axis) to keep a process running that is specific to 
one client's session?  Is it possible for the server to send "responses" 
without the associated requests?

Does that make any sense?

Andrew