jdkを使用してWebServiceサービスを公開
585 ワード
package webservice;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;
/**
* WebService Web
* @author Dqd
*
*/
@WebService
public class HelloService {
/**
* : static final
* @param name
* @return
*/
public String sayHello(String name){
return " "+name;
}
public static void main(String[] args) {
String ip = "http://127.0.0.1:16789/hello";
HelloService helloService = new HelloService();
Endpoint.publish(ip, helloService);
System.out.println("Ready??...");
}
}