51Testing软件测试论坛
标题:
LR9.1录制webService协议脚本问题
[打印本页]
作者:
tracy0079
时间:
2014-12-11 12:30
标题:
LR9.1录制webService协议脚本问题
脚本如下
Action()
{
web_service_call( "StepName=dispatchCommand_108",
"SOAPMethod=IDispatchControl|IDispatchControlHttpPort|dispatchCommand",
"ResponseParam=response",
"Service=IDispatchControl",
"ExpectedResponse=SoapResult",
"Snapshot=t1418272009.inf",
BEGIN_ARGUMENTS,
"in0=",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
soap_request("StepName=SOAP Request",
"URL=http://172.17.162.100:8000/provfront/services/businessService",
"SOAPEnvelope="
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<soapenv:Envelope xmlns:soapenv=\"
http://schemas.xmlsoap.org/soap/envelope/\
" xmlns:con=\"
http://control.ppcore.haobai.huateng.com\
">"
"<soapenv:Header/>"
"<soapenv:Body>"
"<con:dispatchCommand>"
"<con:in0>200901|440000-TIS-1-121.33.197.198|1|121.33.197.198</con:in0>"
"<con:in1>"
"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?><PayPlatRequestParameter> <CTRL-INFO WEBSVRNAME=\" \" WEBSVRCODE=\"200901\" APPFROM=\"350000-YZF-1.0-10.21.32.34\" KEEP=\"012013052910628913\" /> <PARAMETERS> <PRODUCTNO>
13812038709
</PRODUCTNO> <ACCOUNTTYPE>1</ACCOUNTTYPE> <TXNAMOUNT>250000</TXNAMOUNT> <FEEFLAG>1</FEEFLAG> <FEEAMT>0</FEEAMT> <TRANSFERORGCODE></TRANSFERORGCODE> <PAYORGCODE></PAYORGCODE> <BUSINESSTYPE>121030</BUSINESSTYPE> <TXNTYPE>121030</TXNTYPE> <SUPPLYORGCODE>111350060110000</SUPPLYORGCODE> <TERMINALSEQNO></TERMINALSEQNO> <MERCHANTCODE>113350100000000</MERCHANTCODE> <ACCEPTORGCODE>001350000000000</ACCEPTORGCODE> <ACCEPTUID>FJCRM</ACCEPTUID> <ACCEPTAREACODE>350000</ACCEPTAREACODE> <ACCEPTCITYCODE>350100</ACCEPTCITYCODE> <ACCEPTCHANNEL>07</ACCEPTCHANNEL> <ACCEPTSEQNO>2014111810628918</ACCEPTSEQNO> <ACCEPTTRANSDATE>20130529</ACCEPTTRANSDATE> <ACCEPTTRANSTIME>000834</ACCEPTTRANSTIME> <INPUTTIME>20141118000834</INPUTTIME> </PARAMETERS></PayPlatRequestParameter> ]]>"
"</con:in1>"
"</con:dispatchCommand>"
"</soapenv:Body>"
"</soapenv:Envelope>",
"SOAPAction=",
"ResponseParam=response",
"Snapshot=t1418272106.inf",
LAST);
return 0;
}
我想问下web_service_call、 soap_request函数的区别。这样就能跑起来了么,怎么接受返回的报文????
作者:
tracy0079
时间:
2014-12-11 12:31
红色的手机号码需要参数话。
作者:
tracy0079
时间:
2014-12-11 12:56
哪位大神帮忙看看啊
作者:
tracy0079
时间:
2014-12-11 12:56
哪位大神帮忙看看啊
作者:
szyszy2000
时间:
2014-12-11 14:34
两者录制的方式不同,返回值在:"ResponseParam=response", 中的response里面
作者:
tracy0079
时间:
2014-12-11 14:37
szyszy2000 发表于 2014-12-11 14:34
两者录制的方式不同,返回值在:"ResponseParam=response", 中的response里面
放回提示:
Starting action Action.
Action.c(5): SOAP request "SOAP Request" started
Action.c(5): The "SOAP Request" SOAP request response content is not XML
Action.c(5): SOAP request "SOAP Request" was successful
怎么check这个response
作者:
szyszy2000
时间:
2014-12-11 14:49
lr_output_message(lr_eval_string("{response}"));
作者:
szyszy2000
时间:
2014-12-11 14:51
试试 %2B
作者:
hp21818972
时间:
2014-12-12 01:37
webservice call是根据webservice协议定制属性,而soap_request是使用现成的xml文件
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2