Library tutorials & articles

Implementing The Google Web Service In VB.NET

Introduction

A web service is one of the greatest technologies developed in Internet world, which can be used to connect businesses and clients in a standardized method using XML (Extensible Markup Language), SOAP (Simple Object Access Protocol), WSDL (Web Services Description Language) and UDDI (Universal Description, Discovery and Integration).

XML is used for structuring the data, SOAP is used to transfer the data, WSDL is used for describing the services and UDDI is used to get a list of services available. Web services allows application to communicate with each other without worrying about their hardware systems, operating systems and programming languages.

Unlike older models, web services do not provide a user interface, but instead they exposes business logic, which can be programmed, and hence the user is free to add his own interface to the application.

In this article we’re going to learn how to implement the Google web service using Microsoft Visual Basic.Net. You will need the .NET framework installed, as well as Visual Studio.Net if you want to experiment with the source code presented in this article.

Comments

  1. 09 Sep 2008 at 10:09

     I tired this in Visual Basic 9.0 .net 3.5 the code is slightly modified details are given below,

    Public Class Google_Search

     ' for Google Search button


        Private Sub BtnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSearch.Click
            Dim MyLicenseKey As String
            ' Declare variable for the Google search service
            Dim MyService As GoogleReference.GoogleSearchPort = New GoogleReference.GoogleSearchPortClient
            ' Declare variable for the Google Search Result
            Dim MyResult As GoogleReference.GoogleSearchResult
            ' Please Type your license key here
            MyLicenseKey = "tGCTJkYos3YItLYzI9Hg5quBRY8bGqiM"
            ' Execute Google search on the text enter and license key
            MyResult = MyService.doGoogleSearch(MyLicenseKey, _
            TxtSearch.Text, 0, 1, False, "", False, "", "", "")
            ' output the total Results found
            LblTotalFound.Text = "Total Found : " & _
            CStr(MyResult.estimatedTotalResultsCount)
        End Sub

    'For name search button

        Private Sub BtnCheckSpelling_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnCheckSpelling.Click
            Dim MyLicenseKey As String
            ' Declare variable for the Google search service
            Dim MyService As GoogleReference.GoogleSearchPort = New GoogleReference.GoogleSearchPortClient
            ' Declare variable for the Google Search Result
            Dim MyResult As String
            'Please type in your key here
            MyLicenseKey = "tGCTJkYos3YItLYzI9Hg5quBRY8bGqiM"
            ' Execute Google search on the text enter and license key
            MyResult = MyService.doSpellingSuggestion(MyLicenseKey, TxtCheckSpelling.Text)
            'Output Results
            LblCorrectSpelling.Text = "Did you mean: " & MyResult
        End Sub
    End Class
     

  2. 30 Mar 2004 at 08:19

    With a huge pleasure I've found this article. Thank you.

  3. 01 Jan 1999 at 00:00

    This thread is for discussions of Implementing The Google Web Service In VB.NET.

Leave a comment

Sign in or Join us (it's free).

Jayesh Jain Jayesh Jain is working as a Business Analyst in Auckland, New Zealand. He has several years of n-Tier development experience in developing interactive client solutions. He has a passion for Web dev...
AddThis

Related discussion

Related podcasts

  • Introduction to Atlas

    Get your feet wet with an introduction to Atlas. Atlas is the new part of the .NET framework specifically for web clients. Features include AJAX and web services support, new validation controls, behaviors, and an object orientation layer sitting on top of JavaScript.

Events coming up

  • Aug 4

    Core Ajax: Enterprise Web Development with Ajax

    London, United Kingdom

    This intensive, 4-day Core Ajax training course teaches a scalable way of writing robust, user-friendly and secure Ajax solutions for the Enterprise.We will start by introducing Ajax from a business, design and coding perspective. We will then l...

We'd love to hear what you think! Submit ideas or give us feedback