如何測試webservice接口
如何測試webservice接口
幕布斯6054654
2018-12-13 10:05:17
TA貢獻1847條經驗 獲得超7個贊
1.了解url : http://localhost:8080/test/services/user?wsdl;
2.新建web service 項目 Test,啟動接口;
3.在項目Test上新建一個 web service client ,選擇JAX_WS;
4.Test項目會自動生成關聯代碼,新建一個Java類,main方法
1 2 3 4 5 6 7 8 9 | public static void main(String[] args) { System.out.println("123"); ServiceCommandService sc = new ServiceCommandService(); IServiceCommand is = sc.getServiceCommandPort(); String s = is.queryInstanceById(); System.out.println(s); String s2 = is.queryInstanceList(); System.out.println(s2); } |
舉報