Myeclipse+jax-ws搭建WebService服务端

xiaoxiao2021-02-28  64

一、MyEclipse2017CI7安装与破解

参考:http://blog.csdn.net/rcnjtech/article/details/77920978?locationNum=1&fps=1

二、新建WebService Project

参考:http://blog.csdn.net/cai_eternal/article/details/53931257

三、发布WebService

参考:https://www.cnblogs.com/wxjnew/p/4250698.html

1、src的service包下新建类OpratorInfo,写入方法:

public String getName(Stringname){

return name;

}

2、工程右键New-other,在弹出框中选Web Services-Web Service;

3、Next:

4、选择class:

 

5、Finish

6、工程右键Run As-Myeclipse Server Application会打开index.jsp,也可以点击功能区的Tomcat图标启动tomcat,Myeclipse自带Tomcat;

7、访问http://localhost:8080/工程名/OpratorInfoPort?wsdl,OpratorInfoPort是Servicevice port,在sun-jaxws.xml中可见;

打开WebServiceStudio可进行测试:输入网址,点击Get,选择方法,Value中输入参数,Invoke可得到结果。

转载请注明原文地址: https://www.6miu.com/read-1450073.html

最新回复(0)