Forum Discussion

jkrier's avatar
jkrier
Regular Contributor
7 years ago

Retrieve binding properties/values with groovy script

I would like to get the WSDL Definition Namespace in a Groovy script. I tried looking at the code completion to see if I could find anything useful and this is the best I could get.   def iList = r...
  • JHunt's avatar
    7 years ago

    Try it like this:

     

     

    String tns = testRunner.testCase.project.getInterfaceByName('ServiceActivationRouter')
     .getWsdlContext()
     .getDefinitionParts()[0]
     .getContent()
     .with { new XmlSlurper().parseText(it)}
     .with { definitions -> definitions.@targetNamespace.text() }