Looks like you are getting there.
The part you are missing is the following:
First add an Imports Statement to the top of the code file to the named Web Service that you created, i.e. WebServiceFahrenheitToCelciusReference.Code:Imports WindowsApplication6.WebServiceFahrenheitToCelciusReference Public Class Form1 Dim MyWebService As New Service1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click MessageBox.Show(String.Format("15 Degrees Fanhrenheit is {0} Degrees Celcius", MyWebService.ConvertTemperature(15))) End Sub End Class
From there, create a new instance of Service1. This is what you are calling the Web Service currently, in all likelihood this will change, so you will need to watch when you do this that you will need to update the reference in your windows form application.
With that in place you can then simply call methods on the Web Service instance. You currently only have one method and I show example of converting 15 degrees Fahrenheit to degrees Celcius.
Note that your Web Service Reference will actually expose this method as:
So if you want, you can call it asynchronously so as to not block the UI thread.Code:MyWebService.ConvertTemperatureAsync
Gary





Reply With Quote