51Testing软件测试论坛
标题:
在LoadRunner测试中的web service协议问题
[打印本页]
作者:
kangge
时间:
2007-9-14 10:35
标题:
在LoadRunner测试中的web service协议问题
在性能测试过程中,录制脚本选的协议是Web Service,在运行脚本时总是出现下面的错误, 崩溃中......:(,请高手指点啊。:)
Error: server returned an incorrectly formatted SOAP response
我用的是第二种手动指定Wsdl文件的方法来录制脚本的,上面的错误是在脚本初始化时出现的,我上网查的资料上说,需要安装两个补丁:LR80WebServicesFP1_setup.exe和lrunner_web_services_patch_1.exe,我也安装了,但是还存在这个问题。
初始化的脚本如下:
vuser_init()
{
web_service_call( "StepName=submitInfo_101",
"SOAPMethod=InfoWSService.InfoWS.submitInfo",
"ResponseParam=response",
"WSDL=D:/out/InfoWS.wsdl",
"UseWSDLCopy=1",
"Snapshot=t1187317947.inf",
BEGIN_ARGUMENTS,
"strParam=auto string",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
lr_think_time(3);
return 0;
}
录制的Action脚本:
Action()
{
web_add_header("SOAPAction",
"\"\"");
web_add_header("Content-Type", "text/xml; charset=UTF-8");
soap_request("StepName=apply",
"URL=http://172.16.24.72:8080/ac/services/AuthWS",
"SOAPEnvelope=<?xml version='1.0' encoding=\"GB2312\" ?>\n<SOAP-ENV"
":Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\""
" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://"
"www.w3.org/2001/XMLSchema-instance\">\n<SOAP-ENV:Body>\n<ns1:apply "
"xmlns:ns1=\"http://ws.ac.ch2000.com.cn\">\n<ns1:strParam"
">007000111923020956975001</ns1:strParam>\n</ns1:apply>\n</SOAP-ENV"
":Body>\n</SOAP-ENV:Envelope>\n\n",
"Snapshot=t1.inf",
"ResponseParam=response",
LAST);
return 0;
}
但是,如果我用第一种Record Client Appliation录制方法,则没有上面的问题,可以正常运行,这两种录制方法有什么不同吗?为什么第一种方法行,而第二种就不行了呢?
第一种录制方法录制的脚本如下:
Action()
{
web_add_header("SOAPAction",
"\"\"");
web_add_header("Content-Type", "text/xml; charset=UTF-8");
web_service_call("StepName=apply",
"SOAPMethod=AuthWSService.AuthWS.apply",
"WSDL=D:/out/AuthWS.wsdl",
"UseWSDLCopy=1",
"Snapshot=t1.inf",
RecordedBuffer1,
"ResponseParam=response",
BEGIN_ARGUMENTS,
"strParam={sn1}",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
return 0;
}
是不是服务器端的配置有问题?还是Wsdl的方法有问题?哪位高手可否帮我看一下?
Wsdl文件内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://ws.ac.ch2000.com.cn" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://ws.ac.ch2000.com.cn" xmlns:intf="http://ws.ac.ch2000.com.cn" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)-->
<wsdl:types>
<schema elementFormDefault="qualified" targetNamespace="http://ws.ac.ch2000.com.cn" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="apply">
<complexType>
<sequence>
<element name="strParam" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element name="applyResponse">
<complexType>
<sequence>
<element name="applyReturn" type="xsd:string"/>
</sequence>
</complexType>
</element>
</schema>
</wsdl:types>
<wsdl:message name="applyRequest">
<wsdl:part element="impl:apply" name="parameters"/>
</wsdl:message>
<wsdl:message name="applyResponse">
<wsdl:part element="impl:applyResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="AuthWS">
<wsdl:operation name="apply">
<wsdl:input message="impl:applyRequest" name="applyRequest"/>
<wsdl:output message="impl:applyResponse" name="applyResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AuthWSSoapBinding" type="impl:AuthWS">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="apply">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="applyRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="applyResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AuthWSService">
<wsdl:port binding="impl:AuthWSSoapBinding" name="AuthWS">
<wsdlsoap:address location="http://172.16.24.72:8080/ac/services/AuthWS"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
[
本帖最后由 kangge 于 2007-9-14 10:49 编辑
]
作者:
lili365
时间:
2008-3-17 17:54
标题:
关于LoadRunner如何测试WebService的问题
您好,我也出现了和你同样的问题,。但目前没有补丁包:
1 lrunner_web_services_patch_1.exe
2 LR80WebServicesFP1_setup.exe,拜托你能不能给我发一个,本人不胜感激,谢谢!!
我qq号724993820,邮箱:
lili365@163.com
作者:
sailing_99
时间:
2008-3-29 16:07
高手帮忙看一下,下面是脚本 :
vuser_init()
{
web_service_call( "StepName=CustInfoQuery_102",
"SOAPMethod=CustInfoQueryPTExport1_CustInfoQueryPTHttpService.CustInfoQueryPT.CustInfoQuery",
"ResponseParam=response",
"WSDL=D:/wsdl/CustInfoQueryPTExport1_CustInfoQueryPTHttp_Service.wsdl",
"UseWSDLCopy=1",
"Snapshot=t1206776860.inf",
BEGIN_ARGUMENTS,
"Version=66",
"CustomerSell=600101",
"xml
ueryCondition=<QueryCondition><QueryColName>CustomerName</QueryColName>"
"<QueryColValue>99</QueryColValue></QueryCondition>",
"QueryType=1",
"MsgSender=600101",
"MsgReceiver=10",
END_ARGUMENTS,
BEGIN_RESULT,
END_RESULT,
LAST);
lr_think_time(3);
return 0;
}
----------------------------------
虚拟用户脚本已启动
正在开始操作 vuser_init。
vuser_init.c(4): Web service call "CustInfoQuery_102" started
vuser_init.c(4): Using working copy of the WSDL file "D:/wsdl/CustInfoQueryPTExport1_CustInfoQueryPTHttp_Service.wsdl"
vuser_init.c(4): Using client emulation General
vuser_init.c(4): Removed Web headers not matching the emulated client
vuser_init.c(4): 错误: C interpreter run time error: vuser_init.c (4):
Error -- memory violation : Exception ACCESS_VIOLATION received.
vuser_init.c(4):
通知: CCI 跟踪: vuser_init.c(4): web_service_call(0x011f035c "StepName=CustInfoQuery_102", 0x011f0301 "SOAPMethod=CustInfoQueryPTExport1_CustIn...", 0x011f02ea "ResponseParam=response", 0x011f02a5 "WSDL=D:/wsdl/CustInfoQueryPTExport1_Cust...", 0x011f0297 "UseWSDLCopy=1", 0x011f027e.
vuser_init.c(4):
通知: CCI 跟踪: "Snapshot=t1206776860.inf", 0x011f026e "BEGIN_ARGUMENTS", 0x011f0263 "Version=66", 0x011f024f "CustomerSell=600101", 0x011f01d0 "xml
ueryCondition=<QueryCondition><Quer...", 0x011f01c4 "QueryType=1", 0x011f01b3 "MsgSender=600101", 0x011f01a4 "MsgReceiver=.
vuser_init.c(4):
通知: CCI 跟踪: 10", 0x011f0196 "END_ARGUMENTS", 0x011f0189 "BEGIN_RESULT", 0x011f017e "END_RESULT", 18809209)
.
vuser_init.c(4): 通知: CCI 跟踪: Compiled_code(0): vuser_init()
.
-------------------------------------
哪位高手看一下:
作者:
sailing_99
时间:
2008-3-29 16:08
QQ:505361712
急用!
作者:
liuh3218
时间:
2008-5-5 16:40
有什么样的解决方法啊?
作者:
英雄之路
时间:
2009-6-20 23:29
server returned an incorrectly formatted SOAP response
意思是说你发出请求,服务器端返回的数据不符合soap规范,这个具体要看返回的报文了。
作者:
wjtest
时间:
2011-7-2 16:50
急需,两个补丁,能不能把 LR80WebServicesFP1_setup.exe和lrunner_web_services_patch_1.exe 两个补丁发我邮箱,
945248629@qq.com
,谢谢!
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2