天天看點

xfire的webservice示例

1、首先将xfire需要的jar包上傳的項目中。

[img]http://dl2.iteye.com/upload/attachment/0115/4354/c1244ea9-c7d4-3407-9a53-0208aaffe2df.png[/img]

項目的結構圖:

[img]http://dl2.iteye.com/upload/attachment/0115/4359/36e86319-21de-3a9b-95c8-95368eea76d8.png[/img]

2、在web.xml檔案中配置xfire資訊

代碼中配置了一個監聽器,我使用監聽器加載jdbc的資訊儲存在記憶體中。

3、定義接口并實作

接口的實作類

4、調用的類