Tutorials » Using Web Services with VB.NET

Getting Started

Now that you have received your license key, we will create a customized search and a spelling checker using Google’s Web API service. We will write our application in Visual Basic .NET.

Open Visual Studio .NET, create a new Windows Application Project, which we will call googleapi, click OK.

Figure 1
Creating project in VB.NET

Adding a Web Reference to Google's Web Service

We will now add a Web Reference to Google’s Web API service, this is almost like adding a reference to a COM/ActiveX object, but when we add a Web Reference we now have access to all the XML web services on Google’s server. Open your Solution Explorer, right click the References and click Add Web Reference, alternatively you could select Project menu and click Add Web Reference.

In the "Add Web Reference" window, type "http://api.Google.com/GoogleSearch.wsdl" in the address bar (please make sure you type exactly as show, as this URL is case sensitive)

Figure 2
Add Web Reference

After you enter the URL and press Enter and the Google Web Service is loaded you should see a screen like Figure 2, also the Add Reference button is enabled, click the Add Reference button to add this web reference to our project.

In the Solution Explorer Window, click on the Web References folder to see a Google Web Reference, which we have added, lets rename that to Google by right clicking on it and clicking Rename.

Figure 3
Solution Explorer Window

Previous Start Next
  1 2 3 4 5