Performance based learning 6-WebService (SOAP protocol) combat

WSDL import: http: //www.webxml.com.cn/webservices/weatherwebservice.asmx wsdl?

Demos Interface: getSupportCity 

The weather forecast for this query Web Services support of domestic and foreign cities or regions Information

Input parameters: byProvinceName = specified Chau province or country, if it is empty it means ALL or return the entire city; return data: a one-dimensional array of strings String (), structure: the name of the city (city code).

 

Action()
{

web_service_call( "StepName=getSupportCity_101",
"SOAPMethod=WeatherWebService|WeatherWebServiceSoap|getSupportCity",
"ResponseParam=response",
"Service=WeatherWebService",
"ExpectedResponse=SoapResult",
"Snapshot=t1567045711.inf",
BEGIN_ARGUMENTS,
"byProvinceName=",
END_ARGUMENTS,
BEGIN_RESULT,
"getSupportCityResult=Param_getSupportCityResult",
END_RESULT,
LAST);

// xml standard format in the form of correlation results: <string> Shanghai (58367) </ String>
lr_xml_extract ( "the XML Response = {}",
"FastQuery = / Envelope / Body / getSupportCityResponse / getSupportCityResult / String [2]",
"XMLFragmentParam ParamXml_string = ",
LAST);

//values形式 关联 结果 值:上海 (58367)
lr_xml_get_values("XML={response}",
"FastQuery=/Envelope/Body/getSupportCityResponse/getSupportCityResult/string[2]",
"ValueParam=ParamValue_string",
LAST);
//设置检查点
lr_xml_find("XML={response}",
"FastQuery=/Envelope/Body/getSupportCityResponse/getSupportCityResult/string",
"Value=北京 (54511)",
LAST);


return 0;
}

 

Guess you like

Origin www.cnblogs.com/huanghousong/p/11428576.html