WebService
来源:互联网 发布:怎样推广淘宝网店 编辑:程序博客网 时间:2024/06/05 17:22
WebService是什么? Webservice的一个最基本的目的就是提供在各个不同平台的不同应用系统的协同工作能力。其实WebService并不是什么神秘的东西,它就是一个可以远程调用的类,或者说是组件。 把你本地的功能开放出去共别人调用。怎么用?要用俩个端一个服务端一个客户端。先去www.webxml.com.cn去查找你想要用的然后打开你的项目在src文件夹下用命令的形式打开去加载你的webxml服务端代码package com.zking.ws;import javax.jws.WebMethod;import javax.jws.WebService;@WebServicepublic interface Person { @WebMethod public String eat(String what);}package com.zking.ws;import javax.jws.WebService;@WebServicepublic class PersonImp implements Person { @Override public String eat(String what) { System.out.println("服务端"+what); return "xx"+what; }}package com.zking.ws;import javax.xml.ws.Endpoint;public class Testpublish { public static void main(String[] args) { String address="http://193.168.2.66:4366/prod.do"; Endpoint.publish(address, new PersonImp()); System.out.println("xx。。。"); }}package com.zking.test;import com.zking.ws.PersonImp;import com.zking.ws.PersonImpService;public class Teatservlce { public static void main(String[] args) { PersonImpService personImpService=new PersonImpService(); PersonImp personImp=personImpService.getPersonImpPort(); personImp.eat("xx");}}
阅读全文
1 0
- WebService
- WebService
- webservice
- webservice
- WebService
- webservice
- webService
- WebService
- WebService
- webService
- WEBService
- webService
- WebService
- [WebService]
- webservice
- WebService
- webservice
- WebService
- 基于AWS使用深度学习的10个Linux命令
- easyui combobox动态绑定数据
- 第三方账号登陆还是自主账号登录?
- Vue不同组件之间相互传值
- 纯css水平三级导航栏
- WebService
- HDU
- 通过CSS3的hover一个元素使其兄弟元素也相应改变某种属性
- C语言中sscanf()函数的用法
- 遗传算法
- FAQ
- 机器学习-梯度下降II
- 递归求阶乘
- duilib比较好的网站