Je cherche tout simplement à retourner d'une méthode d'un web service une arrayList d'objet.
Il semble que la sérialisation d'un arraylist avec axis n'est pas possible.
Est-ce en fait possible ?????
Soit la méthode du webservice utilitaire testée qui fonctionne correctement et qui retourne un arraylist d'objet personne, par exemple :
public List<Personne> recupListObjetPersonnes(int entierFactice)throws SQLException{
Personne maPersonne = new Personne();
int i =0;
List<Personne> Personnes = maPersonne.trouverPersonnes2();
for(i = 0;i < Personnes.size(); i++)
{
System.out.println(Personnes.get(i).getNom() + " " +
Personnes.get(i).getPrenom() +" " +
Personnes.get(i).getAge() + " " +
Personnes.get(i).getLogin());
}
return Personnes;
}
En publiant le webservice avec l'assistant d'Axis : Create Web Service, j'obtiens :
The service class "utililaire.Utilitaire" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.
The method "recupListObjetPersonnes" on the service class "utililaire.Utilitaire" uses a data type, "java.util.List", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
Merci
Partager