webservice 测试接口方法
发布时间:2020-12-16 22:46:08 所属栏目:安全 来源:网络整理
导读:1.了解url : http://localhost:8080/test/services/user?wsdl; 2.新建web service 项目 Test,启动接口; 3.在项目Test上新建一个 web service client ,选择JAX_WS; 4.Test项目会自动生成关联代码,新建一个Java类,main方法 public static void main(Str
1.了解url : http://localhost:8080/test/services/user?wsdl; 2.新建web service 项目 Test,启动接口; 3.在项目Test上新建一个 web service client ,选择JAX_WS; 4.Test项目会自动生成关联代码,新建一个Java类,main方法 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); } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |