title: groovy.lang.MissingMethodException: No signature of method
body: <p>I am getting the following error -
  groovy.lang.MissingMethodException: No signature of method: Script64$_run_closure5_closure7_closure8_closure9_closure10_closure11.doCall() is applicable for argument types: (java.lang.String) values:  Possible solutions: doCall(java.lang.Object, java.lang.Object), isCase(java.lang.Object), isCase(java.lang.Object) error at line: </p>
  
  <pre><code>Code -  EDIT
  import groovy.xml.*
  
  
  List tempList = []
  List listgenerated = []
  
  def count = 0
  for (a in 0..totalCount-1)
  { 
  
      //nameList and valueList lists will have all the contents added as below   commented pseudo code 
      /*for (b in 0..50) 
      { 
          nameList.add(b,number)     // number is some calculated value
          valueList.add(b,number)
          e.g. nameList=[name1, name2, name3,name4, name5]
               valueList =[val1, val2, val3, , val5]  
  
               listgenerated should be = [[name1:val1, name2:val2], [name3:val3, name4: , name5:val5]]                          
      } */
  
  
          tempList = []
  
          for (j in count..nameList.size())
          {
                  count = j                             
                  def nameKey =  nameList[j]
                  def value
                  if (nameKey != null)
                  {
                      value =  valueList[j]
                      tempList &lt;&lt; [(nameKey) : value]
  
                  }                               
          }    
              count = count 
              listgenerated.putAt(a,tempList) 
              number = number +1
  }   
  
  def process = { binding, element, name -&gt;
    if( element[ name ] instanceof Collection ) {
      element[ name ].each { n -&gt;
        binding."$name"( n )
      }
    }
    else if( element[ name ] ) {
      binding."$name"( element[ name ] )
    }
  }
  
  class Form {
    List fields  
  }
  
  
  
  def list = [[ name:'a', val:'1' ], [ name:'b', val :'2', name2:4, xyz:'abc', pqr:'']]  //Edited list
  f = new Form( fields: list )            //Works fine
  f = new Form( fields: listgenerated )   //Gives the above error
  
  String xml = XmlUtil.serialize( new StreamingMarkupBuilder().with { builder -&gt;
    builder.bind { binding -&gt;
      data {
        f.fields.each { fields -&gt;
          item {
            fields.each { name, value -&gt;
              process( binding, fields, name )
            }
          }
        }
      }
    }
  } )
  </code></pre>
  
  <p>If while creating the "listgenerated" single quotes are added around values it takes it as character and while printing both lists seem different.
  I am unable to figure it out what exactly is going wrong. Any help is appreciated. Thanks.
  Ref - <a href="https://stackoverflow.com/questions/14279092/groovy-dynamically-create-xml-for-collection-of-objects-with-collections-of-pro">Groovy: dynamically create XML for collection of objects with collections of properties</a></p>