groovy.lang.MissingMethodException:No signature of method --groovy script in soap -
i have defined array
def sample1 = ["a","b","c","d"] string[] .. .. def sample9 = ["555","454","678","456"] string[] def p = ["1","2","3","4"] string[] (k=0; k <= 4; k++) { setvalues(sample1[k].concat(p[k]), sample9[k]) } `
i'm trying values like:
a1 = 555 b2 = 454
but on execution error:
groovy.lang.missingmethodexception: no signature of method: script7.setvalues() applicable argument types: (java.lang.string, java.lang.string) values: [a1, [555]] possible solutions: getclass() error @ line: xx
could around? can set values 1 array another? if please me out on
you can combine lists, transpose them , create map collectentries
. e.g.
def sample1 = ["a","b","c","d"] def sample9 = ["555","454","678","456"] def p = ["1","2","3","4"] println([sample1, p, sample9].transpose().collectentries{ k1, k2, v -> ["${k1}${k2}", v] }) // -> [a1:555, b2:454, c3:678, d4:456]
wiki
Comments
Post a Comment