Bonjour,

Je suis nouveau dans l'utilisation de Xml-RPC. Je suis en train d'essayer un exemple de client xml-rpc en java, et j'ai obtenu ce message d'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
Exception in thread "main" java.lang.InstantiationError: org.apache.xmlrpc.XmlRpcRequest
	at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:177)
	at ClientXMLRPCTest.main(ClientXMLRPCTest.java:37)
Le code de mon client est :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
	public static void main(String[] args) throws Exception
	{
	XmlRpcClient client = new XmlRpcClient("mon url", 8443);
 
 
	//Création de l'entête
	Hashtable entete = new Hashtable();
	entete.put("Login", "loginTest");
	entete.put("Password", "passwordTest");
	entete.put("TransmitterId","4000");
	entete.put("TerminalId", "@locale");
	entete.put("TransactionId", new Integer(1001));
	//
	Vector listeCarte = new Vector();
	//
	Hashtable carte = new Hashtable();
	carte.put("RandomNum", "1234567890123456789");
	carte.put("PinCode", "1111");
	//
	listeCarte.add(carte);
	//Création du vecteur de paramètre
	Vector params = new Vector();
	params.add(entete);
	params.add(listeCarte);
	//Appel au serveur XML-RPC
	Object [] response1= (Object [])client.execute("Ppp.maMethode", params);
	if (response1!=null) {
		//First element is always there, this is the header in a HashMap
		HashMap header = (HashMap)response1[0];
		System.out.println("header = "+ header);
		System.out.println("Response = "+ header.get("RequestResponse"));
		System.out.println("ResponseWordings = "+ header.get("ResponseWording"));
 
		//
		if(response1.length>1) {
			//If present, second element of the vector is another vector of hashtables
			Object [] cards = (Object []) response1[1];
			for (int i=0; i<cards.length;i++) {
				HashMap currentCard = (HashMap )cards[i];
				System.out.println("Card response #"+i);
				//
				System.out.println(" RandomNum="+currentCard.get("RandomNum"));
				System.out.println(" CardResponse="+currentCard.get("CardResponse"));
				System.out.println(" CardResponseWording="+currentCard.get("CardResponseWording"));
				System.out.println(" CardBalance="+currentCard.get("CardBalance"));
			}
		}
	}
Merci d'avance.