Consuming NOAA XML web service

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xml .NET group

    #1

    Consuming NOAA XML web service

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


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

    string xmlData = proxy.NDFDgenBy Day(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!


  • Charles Zhang

    #2
    Re: Consuming NOAA XML web service

    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)



    xml .NET group wrote:
    I am trying to consume web services at
    http://www.nws.noaa.gov/forecasts/xml/
    using the web reference

    >
    My code is as follows:
    gov.weather.www.ndfdXML proxy = new gov.weather.www.ndfdXML();
    >
    string xmlData = proxy.NDFDgenBy Day(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!
    >
    >

    Comment

    • claireliu666@gmail.com

      #3
      Re: Consuming NOAA XML web service

      On Apr 9, 5:58 pm, "xml .NET group" <xmlnet@xmlwrot e:
      I am trying to consume web services athttp://www.nws.noaa.go v/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.NDFDgenBy Day(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

      Comment

      Working...