如何从 SOAP UI 工具中的属性传递 SOAP 请求中的输入值? [英] How can I pass input value in SOAP request from properties in SOAP UI tool?
本文介绍了如何从 SOAP UI 工具中的属性传递 SOAP 请求中的输入值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 SOAP ui 来测试 WCF 服务.
I am using SOAP ui to Test WCF services.
我想从 SOAP UI 工具中可用的属性(键值)动态传递输入参数(ExternalReference)的值.
I want to pass value for input parameters (ExternalReference) dynamically from properties(Key-Value) available in SOAP UI tool.
有人知道怎么做吗?
示例 XML
<soapenv:Body>
<mer:GetDocumentSetList>
<!--Optional:-->
<mer:DocumentSetListIn>
<mer1:SearchCriteria>
<!--Optional:-->
<mer1:ExternalReference>8B7A2F87-3546-456D-93EF-C8515BF4A14A</mer1:ExternalReference>
<mer1:ListDateFrom>2020-02-24</mer1:ListDateFrom>
<!--Optional:-->
<mer1:ListDateTo>2020-02-25</mer1:ListDateTo>
</mer1:SearchCriteria>
</mer:DocumentSetListIn>
</mer:GetDocumentSetList>
推荐答案
这很容易.在请求 XML 中,您可以像这样指定它:
It's very easy. in the Request XML you specify it like this:
<ns1:SomeParameter>${#Project#MyPropName}</ns1:SomeParameter>
假设 MyPropName 是项目级别的属性.如果要使用测试用例级别的属性,请使用
Assuming that MyPropName is a Project-level property. If you want to use a test case level property, use
${#TestCase#MyPropName}
这篇关于如何从 SOAP UI 工具中的属性传递 SOAP 请求中的输入值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文