Webサービス/Google Web APIs
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
// 下階層用テンプレート
#topicpath
----
//ここにコンテンツを記述します。
#contents
***Google Web APIsってなんなの [#l56885ab]
Google Web APIsとはGoogleの検索機能をWebサービスAPIを通じ...
**とりあえず、使ってみる。 [#le1bea50]
ライセンスの取得(無料)と、APIのダウンロードをするだけみた...
http://www.google.com/apis/index.htmlにアクセスし、メニュ...
-ライセンスの取得
-APIのダウンロード
をすることができます。
***サンプルをたたいてみる。 [#j2a30797]
ダウンロードしたファイル内にはサンプルが含まれています。...
java -cp googleapi.jar com.google.soap.search.GoogleAPID...
"ライセンスキー" search "きのさいと"
ってやってみると、結果が返ってきました。。
Parameters:
Client key = xxxxxxxxxxxxxxxxxxxxx
Directive = search
Args = きのさいと
Google Search Results:
======================
{
TM = 0.632057
Q = "きのさいと"
CT = ""
TT = ""
CATs =
{
<EMPTY>
}
Start Index = 1
End Index = 10
Estimated Total Results Number = 21
Document Filtering = true
Estimate Correct = false
Rs =
{
[
URL = "http://www.masatom.in/pukiwiki/index.php"
Title = "FrontPage - <b>きの</b><b>さいと</b> Wiki"
Snippet = " <b>...</b> クラス図の基礎(3). edit ページ名
変更. 使用中のひと:2<br> 人. ようこそ「<b>きの</b>
<b>さいと</b>」へ. このサイトはMasatomi KINO <b>...</b...
Directory Category = {SE="", FVN=""}
Directory Title = ""
Summary = ""
Cached Size = "46k"
Related information present = true
Host Name = ""
],
[
URL = "http://search.goo.ne.jp/web.jsp?TAB=&MT=frontp...
Title = "[frontpage apache] goo ウェブ検索結果"
Snippet = " <b>...</b> サイトとして動かす方 法。. ...
http://qwik.jp/ - 7k - キャッ<br> シュ - 別ウィンドウ
表示. 7 FrontPage - <b>きの</b><b>さいと</b>
Wiki ... JDIC <b>...</b> "
Directory Category = {SE="", FVN=""}
Directory Title = ""
Summary = ""
Cached Size = "36k"
Related information present = true
Host Name = ""
],
URL = "http://yoichiro.cocolog-nifty.com/eclipse/"
Title = "Eclipseプラグイン開発"
Snippet = "Eclipseプラグイン開発. Eclipseプラグイン
開発は至難の業!?<br>日々の苦悩から技術を蓄積する
ために綴る日記です。. <b>...</b> "
Directory Category = {SE="", FVN=""}
Directory Title = ""
Summary = ""
Cached Size = "38k"
Related information present = true
Host Name = ""
]
}
}
これはおもろいかもー
**Apache Axisを使う [#ea78a4dc]
http://archive.apache.org/dist/ws/axis/1_2RC2/ よりダウン...
***WSDLからJavaスタブを作る [#zbb6ea53]
java org.apache.axis.wsdl.WSDL2Java -p nu.mine.kino.goog...
パスはあらかじめライブラリに通しておきましょう((Eclipse上...
ちなみに引数でwsdlを指定しますがhttp://で始めればインタネ...
***Axisランタイムのサンプルプログラム [#p0578bf7]
public class TestMain {
public static void main(String[] args) throws ServiceE...
RemoteException {
GoogleSearchServiceLocator locator = new GoogleSearc...
// locator.setGoogleSearchPortEndpointAddress();
GoogleSearchPort googleSearch = locator.getGoogleSea...
GoogleSearchResult result = googleSearch.doGoogleSea...
"xxxxxxxxxxxxxx", "きのさいと", 1, 10, false, "",
false, "", "", "");
ResultElement[] elements = result.getResultElements();
for (int i = 0; i < elements.length; i++) {
ResultElement element = elements[i];
System.out.println("------------------------------...
System.out.println("タイトル: " + element.getTitle...
System.out.println("URL: " + element.getURL());
System.out.println("サマリー: " + element.getSumma...
}
}
}
***プロクシ越えとか [#c880d77f]
プロクシーとか、プロクシ認証とかの設定方法がわかりません...
**関連リンク [#c38da36a]
-[[Apache Axis 日本語サイト:http://ws.apache.org/axis/jp/]]
-[[試して学ぶJ2EE:http://www.javadeveloper.jp/members/reg...
----
この記事は
#vote(おもしろかった[1],そうでもない[1])
#topicpath
SIZE(10){現在のアクセス:&counter;}
終了行:
// 下階層用テンプレート
#topicpath
----
//ここにコンテンツを記述します。
#contents
***Google Web APIsってなんなの [#l56885ab]
Google Web APIsとはGoogleの検索機能をWebサービスAPIを通じ...
**とりあえず、使ってみる。 [#le1bea50]
ライセンスの取得(無料)と、APIのダウンロードをするだけみた...
http://www.google.com/apis/index.htmlにアクセスし、メニュ...
-ライセンスの取得
-APIのダウンロード
をすることができます。
***サンプルをたたいてみる。 [#j2a30797]
ダウンロードしたファイル内にはサンプルが含まれています。...
java -cp googleapi.jar com.google.soap.search.GoogleAPID...
"ライセンスキー" search "きのさいと"
ってやってみると、結果が返ってきました。。
Parameters:
Client key = xxxxxxxxxxxxxxxxxxxxx
Directive = search
Args = きのさいと
Google Search Results:
======================
{
TM = 0.632057
Q = "きのさいと"
CT = ""
TT = ""
CATs =
{
<EMPTY>
}
Start Index = 1
End Index = 10
Estimated Total Results Number = 21
Document Filtering = true
Estimate Correct = false
Rs =
{
[
URL = "http://www.masatom.in/pukiwiki/index.php"
Title = "FrontPage - <b>きの</b><b>さいと</b> Wiki"
Snippet = " <b>...</b> クラス図の基礎(3). edit ページ名
変更. 使用中のひと:2<br> 人. ようこそ「<b>きの</b>
<b>さいと</b>」へ. このサイトはMasatomi KINO <b>...</b...
Directory Category = {SE="", FVN=""}
Directory Title = ""
Summary = ""
Cached Size = "46k"
Related information present = true
Host Name = ""
],
[
URL = "http://search.goo.ne.jp/web.jsp?TAB=&MT=frontp...
Title = "[frontpage apache] goo ウェブ検索結果"
Snippet = " <b>...</b> サイトとして動かす方 法。. ...
http://qwik.jp/ - 7k - キャッ<br> シュ - 別ウィンドウ
表示. 7 FrontPage - <b>きの</b><b>さいと</b>
Wiki ... JDIC <b>...</b> "
Directory Category = {SE="", FVN=""}
Directory Title = ""
Summary = ""
Cached Size = "36k"
Related information present = true
Host Name = ""
],
URL = "http://yoichiro.cocolog-nifty.com/eclipse/"
Title = "Eclipseプラグイン開発"
Snippet = "Eclipseプラグイン開発. Eclipseプラグイン
開発は至難の業!?<br>日々の苦悩から技術を蓄積する
ために綴る日記です。. <b>...</b> "
Directory Category = {SE="", FVN=""}
Directory Title = ""
Summary = ""
Cached Size = "38k"
Related information present = true
Host Name = ""
]
}
}
これはおもろいかもー
**Apache Axisを使う [#ea78a4dc]
http://archive.apache.org/dist/ws/axis/1_2RC2/ よりダウン...
***WSDLからJavaスタブを作る [#zbb6ea53]
java org.apache.axis.wsdl.WSDL2Java -p nu.mine.kino.goog...
パスはあらかじめライブラリに通しておきましょう((Eclipse上...
ちなみに引数でwsdlを指定しますがhttp://で始めればインタネ...
***Axisランタイムのサンプルプログラム [#p0578bf7]
public class TestMain {
public static void main(String[] args) throws ServiceE...
RemoteException {
GoogleSearchServiceLocator locator = new GoogleSearc...
// locator.setGoogleSearchPortEndpointAddress();
GoogleSearchPort googleSearch = locator.getGoogleSea...
GoogleSearchResult result = googleSearch.doGoogleSea...
"xxxxxxxxxxxxxx", "きのさいと", 1, 10, false, "",
false, "", "", "");
ResultElement[] elements = result.getResultElements();
for (int i = 0; i < elements.length; i++) {
ResultElement element = elements[i];
System.out.println("------------------------------...
System.out.println("タイトル: " + element.getTitle...
System.out.println("URL: " + element.getURL());
System.out.println("サマリー: " + element.getSumma...
}
}
}
***プロクシ越えとか [#c880d77f]
プロクシーとか、プロクシ認証とかの設定方法がわかりません...
**関連リンク [#c38da36a]
-[[Apache Axis 日本語サイト:http://ws.apache.org/axis/jp/]]
-[[試して学ぶJ2EE:http://www.javadeveloper.jp/members/reg...
----
この記事は
#vote(おもしろかった[1],そうでもない[1])
#topicpath
SIZE(10){現在のアクセス:&counter;}
ページ名: