在浏覽器上訪問服務器端的服務
編寫一個WSDL
set Axis_Lib=D:\workspace\test\WEB
set Java_Cmd=java
set Output_Path=D:\workspace\test\src
set Package=server
%Java_Cmd% org
執行這個批處理文件就可以生成client stub
生成的stub client文件列表為
下面是一段junit測試客戶端代碼
import java
import junit
import junit
import junit
public class TestWSClient extends TestCase {
public TestWSClient(String string) {
super(string);
}
public void SayHelloClient() throws Exception {
SayHelloService service = new SayHelloServiceLocator();
SayHello_PortType client = service
String retValue = client
System
}
public static Test suite() {
TestSuite suite = new TestSuite();
suite
return suite;
}
}
至此
[
From:http://tw.wingwit.com/Article/program/Java/gj/201311/27696.html