1.綁定本地接口,自動生成代理對象
復制下面鏈接代碼
復制下面鏈接代碼
// Endpoint Address
String endpointAddress = "http://localhost:8111/helloWorld";
// Add a port to the Service
service.addPort(PORT_NAME, SOAPBinding.SOAP11HTTP_BINDING, endpointAddress);
HelloService hw = service.getPort(HelloService.class);
System.out.println(hw.sayHi("World"));
2.wsimport生成客戶端
參照:http://download.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html
2.wsimport生成客戶端
參照:http://download.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html