webservice 接口调用

wsimport -keep -p [包名] -s [src路径] [wsdl地址]

运行命令会在指定src路径生成webservice客户端java代码

调用方法如下:

Service serviceFactory = new Service();
ServiceSoap service = serviceFactory.getServiceSoap();
service.sendMessageAll()

 

wsimport -keep -p com.example.demo.wsclient -s D:\test\src\main\java http://localhost:8080/ws/soap/hello?wsdl

posted @ 2018-08-07 09:40  helloworId  阅读(231)  评论(0编辑  收藏  举报