一般不用Client。使用ServiceFactory,下面是官方给的例子,你可以参考:
// Create a service model for the client
ObjectServiceFactory serviceFactory = new ObjectServiceFactory();
Service serviceModel = serviceFactory.create(Echo.class); // 这里传递客户端stub(就是web服务的接口)的类名
// Create a client proxy
XFireProxyFactory proxyFactory = new XFireProxyFactory();
Echo echo = (Echo) proxyFactory.create(serviceModel, "http://localhost:8191/Echo"); //这里进行方法调用 System.out.println(echo.echo("Hello World"));