清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
服务器端: @WebService(name="Test",serviceName="Test", targetNamespace="http://www.oksonic.cn/xfire") class TestService { static expose=['xfire'] Users users String otherMethod2(@WebParam String name) { return "Hello! ${name+"1"}"; } @WebMethod @WebResult int add(@WebParam int intOne,@WebParam int intTwo) { return intOne+intTwo; } 客户端: public class ClientCeShi { /** * @param args */ public static void main(String[] args) { String wsURL = "http://localhost:8089/dajian/services/Test?wsdl"; try { System.out.println(" ----> 初始客户端 <---- "); Client client = new Client(new URL(wsURL)); Object[] results = client.invoke("ceshi1", new Object[] {"111","111"}); System.out.println(results[0]); System.out.println(" ----> 客户端调用结束 <---- "); } catch (Exception e) { e.printStackTrace(); }