首页 > Web开发 > 详细

webService —— soap

时间:2017-12-17 10:36:26      阅读:228      评论:0      收藏:0      [点我收藏+]
package soupTest;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;

@WebService
public class Main {
	
	public static void main(String[] args) {
		System.out.println("server is running");
		String address = "http://localhost:9000/Main";
		Object implementor = new Main();
		Endpoint.publish(address, implementor);
		
	}
	@WebMethod
	public String sayHello(String str) {
		
		System.out.println("get message...");
		String result = "hello" + str;
		return result;
	}
}

 

webService —— soap

原文:http://www.cnblogs.com/Mr24/p/8048650.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!