[WebServices - GlobalWeather] - Débutant
J'ai un projet en webservices, j'ai choisi d'utiliser le webservice:
http://www.webservicex.com/globalweather.asmx?wsdl
j'essai d'appeler getweather qui prend en paramètre ville et pays.et j'utilise Axis.
Code:
1 2 3 4 5 6 7 8 9 10
| Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress((new URL("http://www.webserviceX.com/globalweather.asmx?WSDL")));
call.setOperationName(new QName("http://www.webserviceX.net/GetWeather"));
call.setOperationStyle("document");
call.setSOAPActionURI("http://www.webserviceX.NET/GetWeather");
String ret = call.invoke(new Object[] {"lille","france"});
return ret; |
malheureusement j'obtiens une erreur de ce style:
Code:
Code:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Procedure 'getWeather' expects parameter '@CountryName', which was not supplied.
voilà il semblerait qu'il ne voit pas qu'il y a le paramètre country en l'occurence ici France. Sad
Si il y a un pro des webservices, ce sera le bienvenue.
Merci d'avance