Consuming NOAA XML web service

  • Thread starter Thread starter xml .NET group
  • Start date Start date
X

xml .NET group

I am trying to consume web services at
http://www.nws.noaa.gov/forecasts/xml/
using the web reference
http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl

My code is as follows:
gov.weather.www.ndfdXML proxy = new gov.weather.www.ndfdXML();

string xmlData = proxy.NDFDgenByDay(47.72, -122.02, DateTime.Today.Date,
"5", "24 hourly");

But I get error:
The best overloaded method match for
'gov.weather.www.ndfdXML.NDFDgenByDay(decimal, decimal, System.DateTime,
string, string)' has some invalid arguments

Any idea??
Thanks!
 
I think the compiler treat 47.72 as "DOUBLE", using "47.72m" so that the
compiler will treat it as decimal.

Charles Zhang
SpeedyDB Technologies (SpeedyDB ADO.NET Provider)
http://www.speedydb.com
 
I am trying to consume web services athttp://www.nws.noaa.gov/forecasts/xml/
using the web referencehttp://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl

My code is as follows:
gov.weather.www.ndfdXMLproxy = new gov.weather.www.ndfdXML();

string xmlData = proxy.NDFDgenByDay(47.72, -122.02, DateTime.Today.Date,
"5", "24 hourly");

But I get error:
The best overloaded method match for
'gov.weather.www.ndfdXML.NDFDgenByDay(decimal, decimal, System.DateTime,
string, string)' has some invalid arguments

Any idea??
Thanks!


Change "24 hourly" to gov.weather.www.formatType.Item24hourly
 
Back
Top