• λ我爱Aspx >> Asp.Net >> 使用Google的Web Service
  • 使用Google的Web Service

  • :aspxer  Դ:internet  :2007-5-28 20:36:38  ؼ:web,google
  • public static void main(String[] args) {

    String clientKey="123456789";

    String query="Word Cup";

    // Create a Google Search object, set our authorization key

    GoogleSearch s = new GoogleSearch();

    s.setKey(clientKey);

    try {

    s.setQueryString(query);

    GoogleSearchResult r = s.doSearch();

    System.out.println("Google Search Results:"+t.toString());

    } catch (GoogleSearchFault f) {

    System.out.println("The call to the Google Web APIs failed:"+f.toString());

    }

    }

    }

    五、总结

    Google搜索引擎提供了搜索、缓存和拼写简单功能,通过Web Service可以在不同的平台、不同的语言使用,为了简化SOAP的开发,Google还提供了包装了SOAP服务的Java API,这也大大提高了Java程序员的开发效率。随着搜索内容、形式的丰富,更多的开发人员可以将这种技术运用在自己应用程序中,扩展应用程度的功能。

    Ҷƪл˵?
  • һƪ利用正则表达式将html网页数据变成Web Service
    һƪ新浪短信Web Service