最近在学习Loadrunner工具,前几天第一次尝试手工编写soap_request编写脚本,主要适用于webservice接口。
如下所示:
<span style="font-family:Microsoft YaHei;"><span style="font-family:Microsoft YaHei;">Action()
{
web_add_header("SOAPAction", "\"\"");
web_add_header("Accept-Encoding","gzip");
lr_start_transaction("Order");
soap_request("StepName=createBatchTransOrder",
"URL=http://10.0.0.1/xxx?wsdl", //具体的wsdl文件
"SOAPEnvelope=<?xml version=\"1.0\" encoding=\"US-ASCII\"?>" //编码方式和xml版本
"<soapenv:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" "
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\