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_attributehtml, 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?
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_attributehtml, 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?