使用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:

 

评分:0

我来说两句

日历

« 2024-05-17  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 1364
  • 日志数: 4
  • 建立时间: 2010-08-18
  • 更新时间: 2011-01-20

RSS订阅

Open Toolbar