je cherche un web service météo pour l'utiliser dans mon application android
un web service avec le fichier wsdl j'ai cherché beacoup mais je pas trouvé des liens utiles et clairs ...
merci pour vos aide :D
Version imprimable
je cherche un web service météo pour l'utiliser dans mon application android
un web service avec le fichier wsdl j'ai cherché beacoup mais je pas trouvé des liens utiles et clairs ...
merci pour vos aide :D
j'ai trouvé un lien que peu m'aider j 'essayé mais je pense qu'il y a un problème de web service .net avec android et ksoap2
lien :http://www.webservicex.net/globalweather.asmx?wsdl
j 'ai récupéré :
Mais il y a une exception : " www.webservicex.net"Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 public static String URL ="http://www.webservicex.net/globalweather.asmx"; public static final String SOAP_ACTION = "http://www.webservicex.net/GetWeather"; public static final String METHOD_NAME = "GlobalWeather"; public static final String NAMESPACE = "http://www.webservicex.net"; et voilà suite de code : public void onClick(View arg0) { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); request.addProperty("CityName",tv1.getText().toString()); request.addProperty("CountryName",tv2.getText().toString()); envelope.dotNet=true; envelope.setOutputSoapObject(request); HttpTransportSE a = new HttpTransportSE(URL); a.debug = false; try { a.call(SOAP_ACTION, envelope); String rest1 = envelope.getResponse().toString(); rest.setText(rest1); }catch (Exception e){ rest.setText(e.getMessage()); } }
merci