This Example uses C#, .NET 2005, and the mapserv.utah.gov web services provided by AGRC. I will teach you how to add a web service to your project, create an object of the newly added class and call that classes functions.
Go to mapserv.utah.gov and sign up for an account. Then login and you will be able to see the URL's for the web services. Once logged in you can copy the geocoding URL which is what is used for this example.
Open your Visual Studio Project you wish to add the web service to.
Right click on your solution in the solution explorer of .NET and click "Add Web Reference".
A dialog box appears and asks you to enter the path for the web service. This URL points to the web service you want to use and is located in the web service descriptions above. Remember you must login to view the URL's.
Add a web reference name, I chose geocoder, so you can reference this web service class from .NET later on. Click Add Reference (Refer to above screen capture).
Now you are all ready to use this new .NET web reference as a class. The image below is a screen capture of how to create an object of this class and invoke this new objects methods.
Reference your web service class by the name you chose above. Create an object of this class. Take a look at the methods available to you. The most important method is "GeocodeAddress", which takes your user name to authenticate you, a string address and zip code or city zone. This method returns a GeocodeResult object so be sure to create an object to store the results.