WebService简单应用
WebService发布注意:
1.添加注解"@WebService"
????????2.EndPoint 发布WebService服务
?
?
?
package com;import javax.jws.WebService;import javax.xml.ws.Endpoint;@WebServicepublic class HelloWorld {public String SayHI() {System.out.println("服务被调用了");return "HelloWorld^^^";}public static void main(String[] args) {HelloWorld hw = new HelloWorld();//Endpoint 端点服务类,发布WebService服务Endpoint ep = Endpoint.publish("http://192.168.1.101:8888/helloworld", hw);System.out.println("服务启动成功………………");}}
?