consuming the noaa web service

M

MattB

Hi. I'm trying to write a web form that will consumer the NOAA's web
service. I keep getting a timeout from my .net stuff, but their demo
seems to be getting live data, so I suspect I'm doing something wrong.

Have any of you ever done this?
I have a web reference to their wsdl
(http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl) and
the following code always times out:

Dim oWeather As New gov.noaa.nws.www.ndfdXML
Dim strReturn As String

Try
strReturn =
oWeather.NDFDgenByDay(38.32,-106.56,"2004-12-30", 1,
gov.noaa.nws.www.formatType.Item12hourly)

Catch ex As Exception
strReturn = ex.Message
End Try

lblweather.Text = strReturn
 
J

John Saunders

MattB said:
Hi. I'm trying to write a web form that will consumer the NOAA's web
service. I keep getting a timeout from my .net stuff, but their demo seems
to be getting live data, so I suspect I'm doing something wrong.

Have any of you ever done this?
I have a web reference to their wsdl
(http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl) and the
following code always times out:

Dim oWeather As New gov.noaa.nws.www.ndfdXML
Dim strReturn As String

Try
strReturn = oWeather.NDFDgenByDay(38.32,-106.56,"2004-12-30",
1, gov.noaa.nws.www.formatType.Item12hourly)

Catch ex As Exception
strReturn = ex.Message
End Try

lblweather.Text = strReturn

I just tried it and got a timeout as well. I'm trying it again after raising
the timeout (I'm going to watch some TV and come back):

oWeather.Timeout = 1 * 60 * 60 * 1000 ' Before the Try

John Saunders
 
J

John Saunders

John Saunders said:
I just tried it and got a timeout as well. I'm trying it again after
raising the timeout (I'm going to watch some TV and come back):

oWeather.Timeout = 1 * 60 * 60 * 1000 ' Before the Try

With the higher timeout, I get:

[WebException: The underlying connection was closed: An unexpected error
occurred on a receive.]
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
request)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
WebApplication1.gov.noaa.nws.www.ndfdXML.NDFDgenByDay(Decimal latitude,
Decimal longitude, DateTime startDate, String numDays, formatType format) in
d:\inetpub\wwwroot\WebApplication1\Web
References\gov.noaa.nws.www\Reference.vb:60
WebApplication1.WebForm1.Button2_Click(Object sender, EventArgs e) in
d:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:74
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain() +1292


I think their service may be down.

John Saunders
 
M

MattB

John said:
I just tried it and got a timeout as well. I'm trying it again after
raising the timeout (I'm going to watch some TV and come back):

oWeather.Timeout = 1 * 60 * 60 * 1000 ' Before the Try


With the higher timeout, I get:

[WebException: The underlying connection was closed: An unexpected error
occurred on a receive.]
System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
request)
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)
WebApplication1.gov.noaa.nws.www.ndfdXML.NDFDgenByDay(Decimal latitude,
Decimal longitude, DateTime startDate, String numDays, formatType format) in
d:\inetpub\wwwroot\WebApplication1\Web
References\gov.noaa.nws.www\Reference.vb:60
WebApplication1.WebForm1.Button2_Click(Object sender, EventArgs e) in
d:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.vb:74
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain() +1292


I think their service may be down.

John Saunders

Thanks for checking. Sort of a relief, yet annoying too. I guess I'm
getting what I paid for with this free service!

Matt
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top