Forum Discussion

steveKubik's avatar
steveKubik
Occasional Contributor
8 years ago

SOAP Request issue in Groovy Script

 

Hi All,

    

I am getting error while I creating SOAP request by using below script. Looks something I was missing and Could someone assist on this. 

 

Error:

 

groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.WsdlPropertiesTestStep.addTestStep() is applicable for argument types: (com.eviware.soapui.config.impl.TestStepConfigImpl) values: [ GlobalWeatherSoap GetCitiesByCountry UTF-8 http://www.webservicex.com/globalweather.asmx ? ]]> ] error at line: 32

 

 

Code:


WsdlInterfaceFactory.importWsdl(project, 'http://www.webservicex.com/globalweather.asmx?WSDL', true)
def operation = testRunner.testCase.testSuite.project.getInterfaceAt(0).getOperationList()[0]
def factory = new WsdlTestRequestStepFactory()
def arr = ["CUS","ARO","RSS","VEO"]
for(def x : arr){
log.info "For each Loop" + operation;
config = factory.createConfig(operation,x)
testStep = ts.addTestStep(config)
testStep.properties['Request'].value = '<request>someData</request>'
}
context.testCase.testSuite.project.save()

 

 

 Any help is appreciated. Please