Consuming NOAA XML web service

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!
 
C

Charles Zhang

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
 
C

claireliu666

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top