B
Brock
I have a classic textbook example of consuming a Web service. I'm
using Visual Web Developer Express 2008 v9. I have a textbox, a
listbox, and a button on my .aspx form. I'm trying to use the
http://developer.capeclear.com/files/GlobalWeather.wsdl as my Web
reference which looks good so far. But my code has some what will
assurably be obvious flaws to many. You can see the WSDL at the above
link. The method in that I am trying to use is "searchByCode"... so I
would of course enter an airport code like "LAX" and get weather for
Los Angeles. The following code needs some help. the compiler doesn't
like the item "textCode" below and it's saying that all the "ws." 's
are not declared. Anyone? THANKS!!
<script runat="server">
Private Sub btnGetSummary_Click(ByVal sender As Object, ByVal e
As
System.EventArgs) Handles btnGetSummary.Click
Dim aw As com.capeclear.developer.WeatherReport = New
com.capeclear.developer.WeatherReport()
Dim ws As
com.capeclear.developer.getWeatherReport(txtCode.Text)
With lbResults.Items
.Clear()
.Add("Visibility: " & ws.visibility)
.Add("Temperature: " & ws.temperature)
.Add("Winds: " & ws.winds)
.Add("Precipitation: " & ws.precipitation)
.Add("Sky: " & ws.sky)
.Add("Pressure: " & ws.pressure)
End With
End Sub
</script>
using Visual Web Developer Express 2008 v9. I have a textbox, a
listbox, and a button on my .aspx form. I'm trying to use the
http://developer.capeclear.com/files/GlobalWeather.wsdl as my Web
reference which looks good so far. But my code has some what will
assurably be obvious flaws to many. You can see the WSDL at the above
link. The method in that I am trying to use is "searchByCode"... so I
would of course enter an airport code like "LAX" and get weather for
Los Angeles. The following code needs some help. the compiler doesn't
like the item "textCode" below and it's saying that all the "ws." 's
are not declared. Anyone? THANKS!!
<script runat="server">
Private Sub btnGetSummary_Click(ByVal sender As Object, ByVal e
As
System.EventArgs) Handles btnGetSummary.Click
Dim aw As com.capeclear.developer.WeatherReport = New
com.capeclear.developer.WeatherReport()
Dim ws As
com.capeclear.developer.getWeatherReport(txtCode.Text)
With lbResults.Items
.Clear()
.Add("Visibility: " & ws.visibility)
.Add("Temperature: " & ws.temperature)
.Add("Winds: " & ws.winds)
.Add("Precipitation: " & ws.precipitation)
.Add("Sky: " & ws.sky)
.Add("Pressure: " & ws.pressure)
End With
End Sub
</script>