使用HTTP协议测试WEB SERVICE
上一篇 /
下一篇 2010-08-18 14:00:51
/ 个人分类:LoadRunner
web_remove_auto_header("Accept-Encoding", LAST);
web_add_header("Content-Type", "text/xml; charset=utf-8");
web_add_header("SOAPAction", "http://tempuri.org/GetAVHInfo");
web_reg_save_param("ResponseBody",
"LB=",
"RB=",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);
web_custom_request("GetAVHInfo",
"URL=http://192.168.1.251:9998/BenefitService.asmx",
"Method=POST", "TargetFrame=", "Resource=0", "Referer=",
"Body="
"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">"
"<soap:Body>"
"<GetAVHInfo xmlns=\"http://tempuri.org/\">"
"<UserName>cd88888</UserName>"
"<TakeoffDate>2010-12-20</TakeoffDate>"
"<FromCity>ctu</FromCity>"
"<ToCity>kwe</ToCity>"
"<Sign>string</Sign>"
"</GetAVHInfo>"
"</soap:Body>"
"</soap:Envelope>",LAST);
lr_xml_extract("XML={ResponseBody}",
"XMLFragmentParam=OutputParameter",
"Query=/soap:Envelope/soap:Body/GetAVHInfoResponse/GetAVHInfoResult", LAST);
lr_error_message("%s", lr_eval_string("{OutputParameter}"));
收藏
举报
TAG: