无法在 SoapUI 中调用请求 - 不明确的方法重载

Unable to call request in SoapUI - Ambiguous method overloading

我在 SoapUI SOAP 请求中使用以下代码作为 Script Assertion 从 xml 输出中获取值:

import java.text.SimpleDateFormat
import com.eviware.soapui.support.XmlHolder

def xml = new com.eviware.soapui.support.XmlHolder(context.response)
def fname = xml.getNodeValue("//*:name")

它运行良好,当我直接执行请求时,但是当使用此代码从另一个测试步骤调用它时收到错误消息:testStepgetAttachment.run(testRunner, context)

错误信息:

Ambiguous method overloading for method com.eviware.soapui.support.XmlHolder#. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [interface org.apache.xmlbeans.XmlObject] [interface org.w3c.dom.Node]

上下文不仅仅是上下文。这取决于你在做什么。

如果我直接 运行 它——作为测试步骤、测试用例或测试套件——它是 com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext

的一个实例

如果我 运行 它来自另一个测试用例中的 Groovy 脚本测试步骤,它是 com.eviware.soapui.impl.wsdl.panels.support.MockTestRunContext

的一个实例

而且可能还有更多的可能性。