性能基础学习6-WebService(SOAP协议)实战

导入的WSDL:http://www.webxml.com.cn/webservices/weatherwebservice.asmx?wsdl

演示接口:getSupportCity 

查询本天气预报Web Services支持的国内外城市或地区信息

输入参数:byProvinceName = 指定的洲或国内的省份,若为ALL或空则表示返回全部城市;返回数据:一个一维字符串数组 String(),结构为:城市名称(城市代码)。

 

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形式 关联 结果 标准格式:<string>上海 (58367)</string>
lr_xml_extract("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;
}

 

转载于:https://www.cnblogs.com/huanghousong/p/11428576.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值