8,906
社区成员
发帖
与我相关
我的任务
分享
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPR = new EndpointReference(
"http://www.webxml.com.cn/WebServices/WeatherWebService.asmx");
options.setTo(targetEPR);
// /////////////////////////////////////////////////////////////////////
/*
* Creates an Entry and stores it in the AddressBook.
*/
// QName of the target method
QName opGetWeather = new QName("http://WebXml.com.cn/", "getWeatherbyCityName");
Object[] opGetWeatherArgs = new Object[] { "昆明"};
Class[] returnTypes = new Class[] { String[].class };
Object[] response = serviceClient.invokeBlocking(opGetWeather ,
opGetWeatherArgs , returnTypes);
String[] result=(String[])response[0];