方法com.eviware.soapui.support.XmlHolder的方法重载不明确

时间:2019-06-06 22:12:38

标签: groovy soapui

当我在SoapUI 5.5.0中尝试此常规脚本时,出现此错误:

  

groovy.lang.GroovyRuntimeException:方法com.eviware.soapui.support.XmlHolder#的方法重载不明确。由于以下两者之间的原型重叠,无法解析为[null]调用的方法:[interface org.apache.xmlbeans.XmlObject] [interface org.w3c.dom.Node]错误在第19行:

{  
   "CompositeResponse":{       
      "CompositeIndividualResponse":
      [  
         {  
            "PersonSSNIdentification":"221212501"
         }
      ]
   }
}

1 个答案:

答案 0 :(得分:0)

您的脚本具有:

...
def request=log.info testRunner.testCase.testSuite.testCases["AddAutomation"].testSteps["Add"].getPropertyValue("Request")

def xmlnew=new XmlHolder(request)
...

log.info行将始终返回null,因此下一行将出错。您真正想要的是:

...
def request=testRunner.testCase.testSuite.testCases["AddAutomation"].testSteps["Add"].getPropertyValue("Request")
log.info request
def xmlnew=new XmlHolder(request)
...