engswee / equalize-cpi-converter

CPI Converter a.k.a. FormatConversionBean for CPI
MIT License
17 stars 9 forks source link

XML to EXCEL groovy #18

Closed yrafih closed 5 months ago

yrafih commented 5 months ago

Hi!

Thank you very much for the repo, i followed all the steps but i have an error on the final groovy script, here is the error:

javax.script.ScriptException: java.lang.Exception: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method groovy.util.XmlSlurper#parse. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.io.File] [class java.io.InputStream] [class java.io.Reader] [class java.lang.String] [class org.xml.sax.InputSource]@ line 10 in converter.groovy, cause: groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method groovy.util.XmlSlurper#parse. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.io.File] [class java.io.InputStream] [class java.io.Reader] [class java.lang.String] [class org.xml.sax.InputSource]

xml_input content_modifier

yrafih commented 5 months ago

The problem was caused by the data type sent by the flow, the solution is define the in.body in property as a string and call it in the same content modifier.