views:

518

answers:

3

Hi,

How can i get array list of custom object from web service?

I define a method that returns a list like this : ArrayList<Car> getVehicle() {...}

But in client ws, I receive an ArrayList of objects...

It seems I can't cast it even by copying custom class to client jar file of my applet, like serialized object...

How can i do that?

A: 

Is this an option:

List<Vehicule> getVehicule() {...}

Does it change anything?

Pascal Thivent
thanks a lot , but it didn't help me ...
sirvan
A: 

Likewise annotationfree, you can get element even no annotation

ArrayList entries = new ArrayList(number); 
//get,startloop 
  entries.add(new LabelValueElement(
LarsOn
A: 

It seems that you have to cast objects in arraylist at webservice's client end. Did you verify that in .wsdl file you mention proper return type of webservice method? please publish the solution if you already solved this issue.

lucentmind
i solve it by a method like serialize object and RMI , i cant find solution at wsif you want to see code , i can show u?
sirvan