runtime
runtime copied to clipboard
Add missing library
If I use the groovy script in the flow below, I got this error message: Script_5eb2fc433ddabea8979024c1fa44d068.groovy: 15: unable to resolve class XmlParser @ line 15, column 21. def aggregatedXml = new XmlParser().parseText(request.getBody()) ^ 1 error
Use case Instance: next Tenant: Regression tests Group: Issues Flow: GroovyErrors3 Call url in inbound http and you will see the error message
When you get an "unable to resolve X" it means it cannot execute the code, because there is something missing. This can have two reasons:
- Missing library
- Missing import
In this case it's the second. Just add:
import groovy.xml.*
On top of the script