jdk自带发布webservice服务
2014-10-09 14:00
281 查看
1.创建要发布的类
2.发布服务
3.启动运行,打开浏览器输入
package com.test.webserive; import javax.jws.WebService; //targetNamespace定义命名空间 @WebService(targetNamespace="http://www.mess.com") public class HelloServiceImpl { public String sayHello(String name){ return "Hello:"+name; } public String syaHi(String username){ return "Hi:"+username; } }
2.发布服务
package com.test.webserive; import javax.xml.ws.Endpoint; public class Service { public static void main(String[] args){ /** * 参数1:服务器的发布地址 * 参数2:服务的实现者 */ Endpoint.publish("http://10.90.2.17:6789/hello", new HelloServiceImpl()); System.out.println("Server ready..."); } }
3.启动运行,打开浏览器输入
http://10.90.2.17:6789/hello?wsdl 看到下面文件即成功发布:
相关文章推荐
- 使用JDK自带的WebService工具发布WebService服务
- 【解决方案】 java jdk自带的发布服务,wsimport命令生成客户端出错
- WebService(二)jdk发布webservice服务
- 使用jdk自带webservice发布webservice
- WebService服务发布与使用(JDK自带WebService)
- java jdk自带的发布服务,wsimport命令生成客户端出错
- 使用jdk发布WebService服务
- webservice使用JDK自带的jax-ws创建并发布一个简单的webservice
- 关于maven项目搭建并发布到linux(jdk)
- 任务调度(二)——jdk自带的Timer 动态修改任务执行计划
- jdk自带的ThreadLocal和netty扩展的FastThreadLocal比较总结
- Centos环境下卸载自带的JDK
- 使用JDK发布一个简单WebService
- LINUX卸载系统自带JDK 很给力的文章
- Spring整合CXF之发布WebService服务
- ASP.NET Core "完整发布,自带运行时" 到jexus
- jdk自带工具 如何把class 文件 打成jar包 命令
- 新作品发布:asp来设置windows自带的防火墙
- VisualVM——JDK自带的性能分析工具
- javabean与xml互转(jdk自带)