Blog Ho!
A swashbuckling adventure in open source, innovation, and photography
Thursday, 28 August 2008

Home
Photography
Polls
Your photography level of interest...
 
Stone wall - BW

Stone wall - BW

Date: 11/14/2006 Views: 174


 

Google API with Mono on Linux Print E-mail
Monday, 25 April 2005
I was tinkering around and got the Google API to work on Linux with Mono (tried with Fedora Core 3 and Mono 1.0.4, 1.0.6, and 1.1.6). I thought someone else out there might be interested in doing the same.

1 - Grab the Google Search wsdl file.

wget http://api.google.com/GoogleSearch.wsdl

2 - Use the wsdl utility that is part of mono to generate a C# class that can interact with the Google API web service.

wsdl GoogleSearch.wsdl

This outputs a file GoogleSearchService.cs (here's mine).

3 - Compile the GoogleSearchService.cs class into an assembly.

mcs /target:library GoogleSearchService.cs -r System.Web.Services

The "/target" bit tells the compiler to make a library (dll), not a normal program (exe). The "-r" is a necessary library reference.

The output should be a file GoogleSearchService.dll.

4 - Use it! I just put it in the bin directory of my asp.net application (running XSP and mod_mono).

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Personal verbal attacks will be deleted.
  • Please don't use comments to plug your web site.. Such material will be removed
Name:Guest
Title:
Comment:

This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see: *
tips: hit Reload page before writing a text if you have difficulty reading characters in image

Comments

Powered by AkoComment 2.0! and SecurityImage 3.0.4

 
< Prev   Next >