属性 soapui 中的扩展 returns 只有字符串不是期望值

Property expansion in soapui returns only string not the expected value

我正在尝试在基于 soapui 中的 属性 扩展的处理过程中创建动态 属性。

在属性中,变量名是pkSSN,动态值是${createIP -abc#Response#//en:name/num/text()}

Where:
1. createIP -abc is test step name
2. Response (tag is present in the response of the  test step)
3. //en:name/num/text()   xpath of the value

它应该 return ssn 标签中的值,如“123456789”,但它是 [${createIP -abc#Response#//en:name/num/text()}].

我正在关注这个 link “https://www.soapui.org/scripting---properties/property-expansion.html#2-Dynamic-Properties” 但仍然是负输出。有人可以建议我在这里做错了什么。

我已经创建了 2 个请求,它有以下 2 个请求

1) 转化率

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/">
<soapenv:Header/>
<soapenv:Body>
  <web:ConversionRate>
     <web:FromCurrency>DZD</web:FromCurrency>
     <web:ToCurrency>ALL</web:ToCurrency>
  </web:ConversionRate>
 </soapenv:Body>
</soapenv:Envelope>

2) SOAP 请求第二个

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET/">
 <soapenv:Header/>
 <soapenv:Body>
  <web:ConversionRate>
     <web:FromCurrency>USD</web:FromCurrency>
     <web:ToCurrency>${ConversionRate#Request#//web:ConversionRate[1]/web:FromCurrency[1]}</web:ToCurrency>
   </web:ConversionRate>
  </soapenv:Body>
</soapenv:Envelope>

所以命令

${ConversionRate#Request#//web:ConversionRate[1]/web:FromCurrency[1]}

能够检索到您想要实现的目标

我认为您缺少命名空间