51Testing软件测试论坛
标题:
webservice性能测试脚本疑问
[打印本页]
作者:
sunchao0590
时间:
2012-11-13 11:12
标题:
webservice性能测试脚本疑问
脚本如下:
Action()
{
soap_request("StepName=SOAP Request",
"URL=http://134.64.110.40:8000/UnifyCash/services/ESBService",
"SOAPEnvelope="
"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">"
"<soap:Header>"
"<soap:username>test</soap:username>"
"<soap:password>aaa111</soap:password>"
"</soap:Header>"
"<SOAP-ENV:Body>"
"<m:queryResuoceNbr xmlns:m=\"http://imp.webservice.pst.crm.tydic.com\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">"
"<busiCode xsi:type=\"xsd:string\">abc111</busiCode>"
"<paraXml xsi:type=\"xsd:string\">"
"<![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?><ESB><TIME>20121101104821</TIME><MSG_ID>12121232133</MSG_ID><SERVICE_CD>exeUnifyCash0001</SERVICE_CD><TO>tysy</TO><FROM>yyx</FROM><contractBody><buyType>11</buyType><staffCode>admin</staffCode><resuoceNbr>A1000028904940</resuoceNbr><payChange>870</payChange><resuoceId>7370</resuoceId><agentPartmentId>1</agentPartmentId><type>2</type><privilegePrice>30</privilegePrice><marketCode>11111111111111</marketCode></contractBody></ESB>]]>"
"</paraXml>"
"</m:queryResuoceNbr>"
"</SOAP-ENV:Body>"
"</SOAP-ENV:Envelope>",
"SOAPAction=qyeryResuoceNbr",
"ResponseParam=response",
"Snapshot=t1352775831.inf",
LAST);
return 0;
}
运行报错:
Action.c(4): Warning: HTTP status code 500 returned by the server
Action.c(4): Notify: Saving Parameter "response = <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXParseException: The prefix "soap" for element "soap:Header" is not bound.</faultstring><detail><ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">yytmh</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>"
Action.c(4): Error: <CENTER><STRONG><FONT COLOR=#FF0031>Expected SOAP result, received SOAP fault</FONT></STRONG></CENTER>
Action.c(4): Error: SOAP request "SOAP Request" execution failed
Ending action Action.
Ending iteration 1.
Ending Vuser...
请问各位大神,具体是哪里需要调整~~
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2