Bonjour,
je suis entrain de faire un webservice en Java avec Axis/TomCat.
Je voudrais qu'une méthode renvoi un objet perso.
voici l'appel dans mon webservice:
Et ma classe:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 public MaClasse classe(){ return new MaClasse("toto", "tata"); }
C'est une classe de test assez simple.public class MaClasse {
private final String toto;
private final String tata;
public MaClasse(String toto, String tata){
this.toto = toto;
this.tata = tata;
}
}
Quand j'appel ma méthode (http://localhost:8080/axis/mysqljavaws.jws?method=classe)
Voici ceux que m'affiche le navigateur:
Sorry, something seems to have gone wrong... here are the details:
Fault - ; nested exception is:
java.io.IOException: No serializer found for class webservice.test.MaClasse in registry org.apache.axis.encoding.TypeMappingDelegate@7b1641
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: No serializer found for class webservice.test.MaClasse in registry org.apache.axis.encoding.TypeMappingDelegate@7b1641
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:vilxp
Qq1 a une idée?
Vins
[Modéré par Didier] : ajout de tag dans le titre - Les règles du forum Java
Partager