batsman@tux-chan:/tmp$ cat ggl.rb
require 'soap/wsdlDriver'
g = SOAP::WSDLDriverFactory.new('http://api.google.com/GoogleSearch.wsdl'\).create_rpc_driver
g.generate_explicit_type = true
google_key = File.read(File.join(ENV["HOME"], ".google_key"))
r = g.doGoogleSearch(google_key, "ruby", 0, 5, false, "", false, "", "", "" )
puts "About #{r.estimatedTotalResultsCount} results"
puts
r.resultElements.each do |e|
puts "#{e.title}: #{e['URL']}"
puts "#{e.snippet}"
puts
end
batsman@tux-chan:/tmp$ RUBYOPT= ruby ggl.rb
About 2570000 results
<b>Ruby</b> Home Page: http://www.ruby-lang.org/
The Object-Oriented Programming Language <b>Ruby</b> <b>Ruby</b>: Programmers' Best Friend <b>...</b><br> security@<b>ruby</b>-lang.org is a private ML, and anyone can post to it without <b>...</b>
<b>Ruby</b> Central: http://www.rubycentral.com/
<b>Ruby</b> resource: One-click Windows installer; online copy of Programming <b>Ruby</b>: The<br> Pragmatic Programmer's Guide. [Open Publication License]
Programming <b>Ruby</b>: The Pragmatic Programmer's Guide: http://www.rubycentral.com/book/
Full online HTML text at <b>Ruby</b> Central, with download link. [Open Content, Open<br> Publication License]
<b>Ruby</b> on Rails: http://www.rubyonrails.org/
Rails is a full-stack, open-source web framework in <b>Ruby</b> for writing real-world<br> applications with joy and less code than most frameworks spend doing XML <b>...</b>
Dining Out at <b>Ruby</b> Tuesday Restaurant: http://www.rubytuesday.com/
Awesome Food. Serious Salad Bar. Dining out at <b>Ruby</b> Tuesday features popular<br> choices and a wide variety sure toappeal to anyone's appetite.
···
On Wed, Aug 24, 2005 at 09:52:32PM +0900, Dalibor Sramek wrote:
Does anybody use SOAP4R to access Google search service?
I do not want to dive too deep into SOAP peculiarities. So I just tried to
make Pickaxe examples to work. I am getting:
: No Deserializer found to deserialize a ':restrict' using encoding style
'Error. (SOAP::FaultError)
I installed the newest SOAP4R version but Google samples included in the
distribution crashed on various errors too.
--
Mauricio Fernandez