Bonjour,
Je cherche a developpez un web service qui prend un en argument: 2 string (nom, prenom) et qui renvoie un objet "personne".
J'ai reussit a :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 public class Personne { String prenom; String nom; public Personne (){} public Personne (String n, String p){ prenom=p; nom=n; } }
-générer le wsdl
-générer les classe proxy, service, serviceLocator, soapBindingStub
-la classe cliente
la classe cliente:
Le probleme c'est qu'il ne m'affiche pas la classe personne mais :classe.Personne@1
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 public class clientServicePersonne { public static void main(String[]args)throws java.rmi.RemoteException , java.text.ParseException{ ServicePersonneProxy proxxy = new ServicePersonneProxy(); ServicePersonne s=proxxy.getServicePersonne(); int a=Integer.parseInt(args[0]); Personne p=new Personne(); p =s.retournePersonne("er","rt"); System.out.println(p.toString()); }}
j'espere avoir été clair.
Merci d'avance pour vos réponses.
ps: j'utilise, eclipse avec axis et jboss
Partager