Forum Discussion

tshanmuganathan's avatar
tshanmuganathan
New Contributor
10 years ago
Solved

Asserting using GROOVY SCRIPTING

Hi Techies, I am a SOAP UI Beginner and I am trying to validate the response XML from a simple currency converter web service : http://www.webservicex.net/CurrencyConvertor.asmx?WSDL I got the ...
  • nmrao's avatar
    10 years ago
    check this out


    def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
    def holder = groovyUtils.getXmlHolder( messageExchange.responseContent )
    holder.namespaces["ns"] = "http://www.webserviceX.NET/"
    def conversionRate = holder.getNodeValue("//ns:ConversionRateResult")
    log.info conversionRate