programmerist 1983
asked on
How to call weather service by using asmx?
Hi;
My question is simple; i am gonna to call below service :
http://www.webservicex.com/globalweather.asmx?op=GetWeather
But; something is wrong, it is returning to me Data Not Found. How can i fire it? My c# code is :
My question is simple; i am gonna to call below service :
http://www.webservicex.com/globalweather.asmx?op=GetWeather
But; something is wrong, it is returning to me Data Not Found. How can i fire it? My c# code is :
myService.GlobalWeatherSoapClient client = new myService.GlobalWeatherSoapClient();
Console.WriteLine(client.GetWeather("Stockholm", "Sweden"));
Console.WriteLine(client.GetWeather("Berlin", "Germany"));
in other words: your code there is 100% ok. the issue is on the other side
ASKER
Hi;
Thanks for your helps, Do you know any web services for this. i need a asmx service or restful service get data city weather?
Thanks for your helps, Do you know any web services for this. i need a asmx service or restful service get data city weather?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
simple: Berlin is not a city/place exactly in the list of cities (that they support).
see the other webservice:
http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry
take it with Germany, and you will see there are 3 values for Berlin (which happen to be the 3 airports that have weather stations):
Berlin-Schoenefeld
Berlin-Tempelhof
Berlin-Tegel
however, trying one of those values still returned "no data found" message, which clearly tells that the service is not working properly in the backend part, so you need to contact the site support to fix that issue (or clarify what is wrong ...)