Web service retourne "exception"
Bonjour, voilà mon problème, après avoir galérer un moment j'ai écris un petit client web services mais comme retour j'ai "exception".
Voici mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| try {
String endpoint2 = "http://www.webservicex.net/stockquote.asmx";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(endpoint2) );
call.setOperationName(new QName("http://www.webservicex.net/stockquote.asmx?wsdl", "GetQuote"));
call.setSOAPActionURI("http://www.webserviceX.NET/GetQuote");
String ret = (String) call.invoke(new Object[] { "edf" });
System.out.println("Sent 'ibm', Got '" + ret + "'");
} catch (Exception e) {
e.printStackTrace();
} |
et l'affichage :
Sent 'ibm', Got 'exception'
Or je devrait pas du tout avoir ça.
Merci si vous pouvez m'aider !