天天看點

webservice自動生成用戶端步驟總結

1.配置ssm+ws

2.寫service接口

3.

webservice自動生成用戶端步驟總結

這個apache-cxf資源下載下傳裡面有,我無法上傳,自己去下載下傳一個就可以了

webservice自動生成用戶端步驟總結
webservice自動生成用戶端步驟總結
webservice自動生成用戶端步驟總結

在剛剛的黑視窗路徑下執行該密令  wsdl2java.bat -p com.lanou.service  -client -encoding utf-8 -noAddressBinding  

http://localhost:8080/lanoujk/webservice/HelloService?wsdl     這個位址是上圖中的請求位址

webservice自動生成用戶端步驟總結
webservice自動生成用戶端步驟總結

複制該com檔案,去eclipse中建立一個項目,将該檔案夾拷貝進src檔案下

webservice自動生成用戶端步驟總結

libs

webservice自動生成用戶端步驟總結
webservice自動生成用戶端步驟總結

沒法傳jar包,需要的自己找吧

先啟動服務端,然後運作剛剛生成的用戶端即可,有可能會報錯,看原因,因為自動生成有些參數是空的,是以不可以

webservice自動生成用戶端步驟總結