Forum Discussion

darlaritzus's avatar
darlaritzus
Occasional Contributor
7 years ago

Add Multiple WSDL in a Project using Groovy on SOAP UI

Hi All,

           I am new to Groovy and my requirement is add multiple WSDL in my Project and I have created a project by using one WSDL. But I need to add multiple WSDL URL with this code. Please let me know how to add more than one WSDL with this below code.

 

 

WsdlInterfaceFactory.importWsdl(project, 'WSDLURL1', true)
def operation = project.getInterfaceAt(0).getOperationList()[0]
def factory = new WsdlTestRequestStepFactory()
def arr = ["Customer","Purchase","Production","Finance"]

for(def x : arr){

}

 

Thanks

Darla

2 Replies

  • darlaritzus's avatar
    darlaritzus
    Occasional Contributor

    Would any one let me know please.

     

    How to add multiple WSDL and create a project using Groovy Script.

     

    Thanks

    Darla

     

  • PaulMS's avatar
    PaulMS
    Super Contributor

    What error occurred?

     

    Repeating the same code to import another WSDL could cause an error if you define variables of the same name (operation, factory, arr).

     

    Also, if you want to import into the same project then change the index of getInterfaceAt(0) to getInterfaceAt(1) for the second interface.