Action() { lr_rendezvous("city");
lr_start_transaction("city");
web_service_call( "StepName=getSupportCity_103", "SOAPMethod=WeatherWebService.WeatherWebServiceSoap.getSupportCity", "ResponseParam=response", "WSDL=http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl", "UseWSDLCopy=1", "Snapshot=t1249287725.inf", BEGIN_ARGUMENTS, "byProvinceName=={city}", END_ARGUMENTS, BEGIN_RESULT, "getSupportCityResult/*[1]=Param_string",
END_RESULT, LAST);
lr_end_transaction("city", LR_AUTO);
lr_think_time(3); lr_save_var( lr_eval_string("{Param_string}"), 4, 0, "department"); //把获取的城市作为参数输入,获取城市天气 // 获取的参数有代码(合肥 58321),使用lr_save_var(),取前两个汉字
lr_start_transaction("weather");
web_service_call( "StepName=getWeatherbyCityName_103", "SOAPMethod=WeatherWebService.WeatherWebServiceSoap.getWeatherbyCityName", "ResponseParam=response", "WSDL=http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl", "UseWSDLCopy=1", "Snapshot=t1249287726.inf", BEGIN_ARGUMENTS, "theCityName={department}", END_ARGUMENTS, BEGIN_RESULT, END_RESULT, LAST); lr_end_transaction("weather", LR_AUTO);
lr_think_time(3);
return0; } |