1。
IFee 为接口,与服务端的接口一致
IFee ifee = null;
Service serviceModel = new ObjectServiceFactory().create(IFee.class);
String serviceURL = "http://localhost:8080/*/*Service";
ifee = (IFee) new XFireProxyFactory().
create(serviceModel, serviceURL);
String data = ifee.queryBalance(telNo, depart, province);
2。
//对应的WSDL文件
String wsdl = "*/*/*.wsdl";
//根据WSDL创建客户实例
Client client = new Client(new URL(wsdl));
//调用特定的WebService方法
Object[] results = client.invoke("queryBalance", new Object[]{param1, param2, param3});
IFee 为接口,与服务端的接口一致
IFee ifee = null;
Service serviceModel = new ObjectServiceFactory().create(IFee.class);
String serviceURL = "http://localhost:8080/*/*Service";
ifee = (IFee) new XFireProxyFactory().
create(serviceModel, serviceURL);
String data = ifee.queryBalance(telNo, depart, province);
2。
//对应的WSDL文件
String wsdl = "*/*/*.wsdl";
//根据WSDL创建客户实例
Client client = new Client(new URL(wsdl));
//调用特定的WebService方法
Object[] results = client.invoke("queryBalance", new Object[]{param1, param2, param3});