Google's API: undefined method `create_rpc_driver'

J

jotto

I'm trying to connect to Google's API with some popular sample code:

require 'soap/wsdlDriver'
wsdl = "http://api.google.com/GoogleSearch.wsdl"
driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
query = "your query string here"
start = 0
max = 10

@results = driver.doGoogleSearch( key, query, start, max, true, "",
true, 'lang_en', '','')
snippets = @results.resultElements.collect { |r| r.snippet } # you can
get all kinds'a' info here
self.update_attribute:)html, snippets.join("\n")) # or whatever

.......

but i get the following error:

undefined method `create_rpc_driver' for
#<SOAP::WSDLDriverFactory:{urn:GoogleSearch}GoogleSearch>

It doesn't like create_rpc_driver, any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top