导入WSDL并调用“Add Service Call”。我得到了输出,但在执行脚本时,得到了以下错误消息。错误: InvokeMethod失败:响应不是格式正确的XML..错误: ExtractResultArg失败:未将对象引用设置为对象的实例。
真的很感谢如果有人调查这件事。
发布于 2013-04-25 23:52:29
我不确定如何解决您遇到的具体问题,但我可以告诉您,在测试web服务时,我发现使用WEB/HTML协议测试它们要高效得多,也更有用。您可以直接对WSDL URL执行web_custom_request()。我们的开发人员使用SOAP UI对web服务进行单元测试,并且可以轻松地将该工具(有一个免费版本)中创建的调用导入到LR脚本中,而无需在LR中提供的Web服务协议中遇到太多麻烦。
下面是我如何设置它的一个示例:
// first add whatever headers you need
web_add_header("x-ssl-client-cert","-----CERTIFICATE STRING-----");
// use web_custom_request to invoke web service
// hand code the request or use something like SOAPUI
// to record the request
web_custom_request("Your Web Service Call",
"Method=POST",
"URL=http://... ", \\ URL to the WSDL
"Body=<soapenv:Envelope "
"xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" "
"xmlns:mul=\"http://www...\" "
"xmlns=\"http://www....\"> "
" <soapenv:Header/>"
" <soapenv:Body>"
" " // body of your request
" </soapenv:Body>"
"</soapenv:Envelope>",
"TargetFrame=",
LAST);你可能会更幸运地使用这种方法。
https://stackoverflow.com/questions/16200524
复制相似问题