View Single Post
  #4 (permalink)  
Old 08-21-2008, 4:41 PM
JohnH's Avatar
JohnH JohnH is offline
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 37
Posts: 10,299
Reputation: 1314
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Oh, you didn't write this code, you just copied it and wonders what it does? The essence is consuming a webservice, see for example Creating and Consuming a Web Service, Part 2 . In short regarding your posted code a variable is declared to hold the service reference and a new instance is created:
Code:
Dim mForecast As New net.webservicex.www.WeatherForecast
then you can interact with the service methods:
Code:
Dim Wx As net.webservicex.www.WeatherForecasts = mForecast.GetWeatherByZipCode(zip)
LabelPlace.Text = Wx.PlaceName
The namespace (net.webservicex.www) could be different when you add the web reference.
__________________
Reply With Quote