CXF-HelloWorld-Java first 使用注释方式
来源:互联网 发布:mac怎么查激活时间 编辑:程序博客网 时间:2024/06/05 14:10
接口 HelloWorld
package com.demo;
import javax.jws.WebService;
@WebService
public interface HelloWorld {
public String sayHi();
}
HelloWorldImpl.java 实现接口类
package com.demo;
import javax.jws.WebService;
@WebService(
endpointInterface="com.demo.HelloWorld",//端点接口名称
serviceName="com.demo.helloWorld") //服务名称
public class HelloWorldImpl implements HelloWorld {
public String sayHi() {
// TODO Auto-generated method stub
return "Hello";
}
}
Server类:
package com.demo;
import javax.xml.ws.Endpoint;
public class Server {
protected Server() throws Exception {
System.out.println("Starting Server");
HelloWorldImpl implementor = new HelloWorldImpl();
String address = "http://localhost:9000/helloWorld";
Endpoint.publish(address, implementor);
}
public static void main(String args[]) throws Exception {
new Server();
System.out.println("Server ready...");
Thread.sleep(5 * 60 * 1000);
System.out.println("Server exiting");
System.exit(0);
}
}
访问http://localhost:9000/helloWorld?wsdl
- CXF-HelloWorld-Java first 使用注释方式
- CXF-HelloWorld-Java first
- CXF-HelloWorld2-Java first
- 初学java--输出helloworld,转移符以及注释的使用
- Java教程(一)----HelloWorld,注释
- webService 使用CXF 实现简单的helloworld
- java使用cxf webservice
- JAVA的注释方式
- java学习之旅05--Helloworld深化,文本编辑器的使用,注释
- 使用CXF发布和调用webservice之HelloWorld入门
- 使用CXF发布和调用webservice之HelloWorld入门
- 使用CXF发布和调用webservice之HelloWorld入门
- 使用CXF发布和调用webservice之HelloWorld入门
- 使用CXF发布和调用webservice之HelloWorld入门
- 使用CXF开发简单的Web Service-HelloWorld(二)
- 使用CXF开发简单的Web Service-HelloWorld(二)
- 使用CXF发布和调用webservice之HelloWorld入门
- CXF 开发webService的步骤(java First)
- 关于如何使用String.IndexOf 方法(C#)
- 理解的flex事件addEventListener侦听处理流程
- JavaScript语言概述(函数)
- css布局
- 普通行列转换
- CXF-HelloWorld-Java first 使用注释方式
- 格式化Eval的输出,比如 text 的输出
- SQL学习笔记:简单的VC成绩管理源码
- C# 运行已生成的SSIS包
- javascript学习
- 编译kernel时,将编译的具体内容显示出来的方法
- 长时间操作(双击制御和等待画面)
- Struts2 + Spring + Hibernate简单的Login实现
- 淸华紫光帝王笔使用体验