1

I need to format some xml in the groovy script in SoapUI. I'm using method groovy.xml.XmlUtil.serialize(xmlString)

According to the javadoc, this static method should return formatted String. But the SoapUI also displays a popup window with the formatted String. Is there some way I can prevent that? I have no idea why this happens.

enter image description here

  • SoapUI version 5.4.0 on Linux
NeplatnyUdaj
  • 6,052
  • 6
  • 43
  • 76

1 Answers1

1

That is because of the last statement.

Hope you need to log that formatted xml, then add below statement at the end of your script:

log.info formatted
Rao
  • 20,781
  • 11
  • 57
  • 77
  • I don't need to log that. I'm inserting this formatted xml into a request. It works fine, I just don't understand why I get the popup window. The method should just return a String, not display anything. So this is some SoapUI quirk I want to get rid off. – NeplatnyUdaj May 24 '18 at 10:58
  • 1
    I've found the answer here: https://stackoverflow.com/a/24620763/2266098 Apparently, I need to add `return` at the end of the script. Otherwise the last executed statement result is displayed in the popup. – NeplatnyUdaj May 24 '18 at 11:23