SOAP Request issue in Groovy Script
Hi,
I really need a help from someone. I am trying to create single or multiple SOAP request inside test steps. But I am getting error : I have attached error message with this request. Would you please let me know what will be issue? Thanks in advance.
import com.eviware.soapui.impl.wsdl.*
import com.eviware.soapui.impl.WsdlInterfaceFactory
import com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestRequestStepFactory
import com.eviware.soapui.impl.wsdl.teststeps.registry.GroovyScriptStepFactory
import com.eviware.soapui.impl.wsdl.teststeps.registry.WsdlTestRequestStepFactory
import com.eviware.soapui.impl.wsdl.teststeps.registry.GroovyScriptStepFactory
String projectName = "Customer111"
def currentProject = testRunner.testCase.testSuite.project
WsdlProject project = currentProject.getWorkspace().createProject(projectName, new File("C:\\Temp\\" + projectName + ".xml"));
def iface=WsdlInterfaceFactory.importWsdl(project,"http://www.webservicex.com/globalweather.asmx?WSDL",true)[0]
def suite = project.addNewTestSuite("CustomerSuite")
tc = suite.addNewTestCase("CustomerTestCases")
def operation = testRunner.testCase.testSuite.project.getInterfaceAt(0).getOperationList()[0]
def factory = new WsdlTestRequestStepFactory()
def arr = ["PEO","COA","USCS","ASP"]
for(def x : arr){
log.info "For each Loop" + x.toString();
config = factory.createConfig(operation,x)
log.info "Config:::" + config;
testStep = tc.addTestStep(config)
}
context.testCase.testSuite.project.save()
Thanks
Sakthi