[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4779: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4781: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4782: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4783: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
Gentoo Taiwan 討論區 • 檢視主題 - Java Web Service on Gentoo

Java Web Service on Gentoo

Gentoo 管理、通用套件相關問題 (如 iptables、apache、*sql、*ftpd...) 請在此討論。

版主: Forums Team

Java Web Service on Gentoo

文章skychaser » 週一 3月 28, 2005 8:51 pm

這學期修了"分散式計算系統"的課
其中有個作業是要用java完成web services的實作
跟大家分享一下我的心得

由於我是用Gentoo Linux來實作
所以幾乎沒遇到什麼問題~^^b
不像助教說的(以windows平台)"裝好axis能動就很厲害了...",哈~

首先要把tomcat + apache2 + axis用portage給裝起來
解釋一下
所謂的web service在這裡是用soap(Simple Object Access Protocol)在做溝通
然後axis是用java對soap協定的實作
且axis需要架設在一個支援java的web server上
也就是tomcat扮演的角色
以下是我的簡單安裝步驟

1. 安裝基本套件
我的tomcat裝在/opt/tomcat5下
而axis用gentoo安裝的結果好像少了些東西(忘了,好像是沒有samples的樣子)
不管了,我後來是自己下載source回來
接著把source裡的axis-1_2RC2/webapps/axis資料夾給複製到/opt/tomcat/webapps/下

2. axis的設定
把apache & tomcat跑起來後
執行http://localhost:8080/axis/
可以看到一個validate的連結http://localhost:8080/axis/happyaxis.jsp
在這個頁面可以看到你是不是有些必要的jar檔沒有被找到
預設的lib路徑是/opt/tomcat/webapps/axis/WEB-INF/lib
裡面預設有axis-ant.jar、axis.jar、commons-discovery.jar、commons-logging.jar、jaxrpc.jar、log4j-1.2.8.jar、saaj.jar、wsdl4j.jar
我另外下載了xmlsec.jar放在此目錄中
用symbolic link鏈結了activation.jar(sun-jaf-bin套件)、mail.jar(sun-javamail-bin套件)、xercesImpl.jar(xerces-2套件)、xml-apis.jar(xerces-2套件)
這樣就可以正常的通過validate了
(要通過validate最少只需加入activation.jar的連結,mail.jar是option,xercesImpl.jar & xml-apis.jar是為了讓我在command line下deploy一個web service時用的)

3. deploy/undeploy 一個web service
基本上我是參考在上的教學
採用ant來compile、deploy、undeploy我的web service
在這裡僅提供我的範例設定
我的範例是一個提供成績查詢的web services
我把他放在/opt/tomcat5/webapps/axis下
其編出來的class檔會按照其package架構放在/opt/tomcat5/webapps/axis/WEB-INF/classes下
這是我的範例程式
Client執行方法可以參考裡面的一個note檔案


4. 其他
在做這個作業時
如果編好了新的class檔,即使重新deploy過
tomcat仍然執行舊的class,很奇怪
需要重新啟動tomcat才會執行新的class檔
也許是為了效能做了cache的動作吧
skychaser
 
文章: 23
註冊時間: 週二 3月 02, 2004 11:07 pm

Re: Java Web Service on Gentoo

文章Ada » 週二 3月 29, 2005 5:50 pm

網路日誌:http://blog.adahsu.net/ada
Ada
 
文章: 71
註冊時間: 週三 11月 12, 2003 7:27 am
來自: 水溝旁的螞蟻窩


回到 Gentoo 服務與管理

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 8 位訪客

cron