Products Downloads


French version


 

This example describes the registration and use of the GoogleSearch Web service powered by the Google search engine.


Registering the GoogleSearch Web service in the Adelia environment


1. Select the Web Services tab in the Object Manager. (If this tab is not available, add it by selecting the Tabs option in the Object Manager's Object menu).

2. Click the Register button on this tab. This opens the Register a Web Service window.

3. Select the URL radio button and enter the URL of the resource that describes the Web service.

    Run the registration process by clicking the Register button.




4. If registration is successful, the Name and Description fields are completed automatically. If necessary, specify the value of these fields and the visibility field, and then create the object by clicking the Enter button.



5. This new Web service is added to the list in the relevant tab in Object Manager.
  You can display all the properties of the GoogleSearch Web service by selecting the object and clicking the Modify button. This opens the Modify a Web Service window.




6. The GoogleSearch Web service lets the user choose between three operations: doGetCachedPage, doSpellingSuggestion and doGoogleSearch.
    The operation used in this example, doGoogleSearch, has 10 input parameters and one complex output parameter.


Note: This operation's first parameter is a key (used to create an account) that must be retrieved from the website http://www.google.com/apis/.


VA_I program using the GoogleSearch Web service

The program in this example shows the call to the GoogleSearch Web service.

The program's template includes:

  • a CHS_STR_SEARCH field, allowing the user to enter the search string;
  • several fields for displaying the search criteria (CKB_FILTERING, CHO_IS_RESCNT, etc.);
  • a graphical list, IDL_ELEMENTS, that displays the results of the search performed on Google.



Click here to see the code of the program that uses the GoogleSearch Web service




↑ Top of page