为了账号安全,请及时绑定邮箱和手机立即绑定

如何测试webservice接口

如何测试webservice接口

幕布斯6054654 2018-12-13 10:05:17
如何测试webservice接口
查看完整描述

1 回答

?
aluckdog

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);

    }  

 


查看完整回答
反对 回复 2018-12-16
  • 1 回答
  • 0 关注
  • 914 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信