<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: wsdl code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 25 Jul 2008 03:05:06 GMT</pubDate>
    <description>DZone Snippets: wsdl code</description>
    <item>
      <title>wsdl the google API (search google with ruby)</title>
      <link>http://snippets.dzone.com/posts/show/826</link>
      <description>sign up to get a key first&lt;br /&gt;&lt;br /&gt;&lt;codE&gt;&lt;br /&gt;require 'soap/wsdlDriver'&lt;br /&gt;$KCODE = "UTF8"&lt;br /&gt;key = 'LVJnAm5QFHblahblahblah your key here'&lt;br /&gt;&lt;br /&gt;#create driver&lt;br /&gt;wsdl = "http://api.google.com/GoogleSearch.wsdl"&lt;br /&gt;driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver&lt;br /&gt;query = "your query string here"&lt;br /&gt;start = 0&lt;br /&gt;max = 10&lt;br /&gt;  &lt;br /&gt;# see http://dev.ctor.org/soap4r/browser/trunk/sample/wsdl/googleSearch/wsdlDriver.rb&lt;br /&gt;@results = driver.doGoogleSearch( key, query, start, max, true, "", true, 'lang_en', '','')&lt;br /&gt;snippets = @results.resultElements.collect { |r| r.snippet } # you can get all kinds'a' info here&lt;br /&gt;self.update_attribute(:html, snippets.join("\n")) # or whatever&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;</description>
      <pubDate>Fri, 21 Oct 2005 13:54:54 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/826</guid>
      <author>court3nay ()</author>
    </item>
  </channel>
</rss>
