Consuming NOAA XML web service

Discussion in 'ASP .Net Web Services' started by xml .NET group, Apr 9, 2007.

  1. 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!
     
    xml .NET group, Apr 9, 2007
    #1
    1. Advertising

  2. 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


    xml .NET group wrote:
    > 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!
    >
    >
     
    Charles Zhang, Apr 9, 2007
    #2
    1. Advertising

  3. xml .NET group

    Guest

    On Apr 9, 5:58 pm, "xml .NET group" <xmlnet@xml> wrote:
    > 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
     
    , Apr 13, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattB

    consuming the noaa web service

    MattB, Dec 30, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,494
    MattB
    Dec 31, 2004
  2. xml .NET group

    Consuming NOAA XML web service

    xml .NET group, Apr 9, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    724
  3. DNB
    Replies:
    1
    Views:
    260
  4. dgleeson422111

    Consuming local web service - ok, remote web service -problem?

    dgleeson422111, Jan 26, 2010, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    913
    dgleeson422111
    Jan 26, 2010
  5. Curt K
    Replies:
    3
    Views:
    467
    John Saunders [MVP]
    Jun 15, 2007
Loading...

Share This Page