Posted on 2009-07-14 14:21
eric_xu 阅读(256)
评论(0) 编辑 收藏 所属分类:
J2EE
用wsdl生成客户端
Wsdl2java –uri http://localhost:8080/axis2/services/SimpleServer?wsdl
–o d:" -d jaxbri
将生成的java文件拷贝到工程的src文件夹下
public class WsTest {
/**
* @param args
* @throws RemoteException
*/
public static void main(String[] args) throws RemoteException {
// TODO Auto-generated method stub
SimpleServerStub ssstub = new SimpleServerStub();
SimpleMethod sm = new SimpleMethod();
sm.setName("xujun");
SimpleMethodResponse response = ssstub.simpleMethod(sm);
String result = response.get_return();
System.out.println(result);
}
}