title: groovy.lang.MissingMethodException: No signature of method: java.lang.String.name() is applicable for argument types: () values
body: <p>Java 1.8
  Groovy Version 2.4.7</p>
  
  <p>I am passing an xml to a variable called rollbackxmlResp, i am trying to parse and get the value of it.</p>
  
  <p>Xmlcontents of <code>rollbackXmlResp</code> :</p>
  
  <pre><code>&lt;?xml version=\"1.0\" encoding=\"EUC-JP\"?&gt;
      &lt;Root&gt;
          &lt;data&gt;
              &lt;easy_id&gt;12214356&lt;/easy_id&gt;
              &lt;unique_id&gt;53706741&lt;/unique_id&gt;
              &lt;rollback_all_point&gt;100&lt;/rollback_all_point&gt;
              &lt;rollback_term_point&gt;10&lt;/rollback_term_point&gt;
              &lt;rollback_lapse_point&gt;20&lt;/rollback_lapse_point&gt;
              &lt;res_time&gt;2014-05-01 10:29:52&lt;/res_time&gt;
              &lt;result_code&gt;0&lt;/result_code&gt;
          &lt;/data&gt;
      &lt;confirmation_key&gt;ea7784d7d1d80cf94a4066ac48fa3088&lt;/confirmation_key&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Groovy code </p>
  
  <pre><code>public static Map&lt;String, ?&gt; processRollbackResponse(String rollbackXmlResp, String requestTime){
  
      Map rootMap = new LinkedHashMap();
      def responseXml = new XmlParser().parseText(rollbackXmlResp);
      responseXml.children().each {  --&gt; line no 172
          def errorCodesList = new ArrayList&lt;String&gt;()
              it.depthFirst().each {  --&gt; line no 174
                  switch(it.name()){    ----&gt; failing here . line no175
  
                  }
              }
      }
  
      return rootMap
  
      }
  </code></pre>
  
  <p>I am getting this exception</p>
  
  <pre><code>    groovy.lang.MissingMethodException: No signature of method: java.lang.String.name() is applicable for argument types: () values: []
  Possible solutions: take(int), any(), any(groovy.lang.Closure), wait(), size(), dump()
      at co.xx.app.point.util.Random.processRollbackResponse_closure2$_closure6(Random.groovy:175)
      at groovy.lang.Closure.call(Closure.java:414)
      at groovy.lang.Closure.call(Closure.java:430)
      at co.xx.app.point.util.Random.processRollbackResponse_closure2(Random.groovy:174)
          at groovy.lang.Closure.call(Closure.java:414)
      at groovy.lang.Closure.call(Closure.java:430)
      at co.xx.app.point.util.xx.processRollbackResponse(xx.groovy:172)
      at co.xx.app.point.util.xxSpock.processRollbackSuccessResponse(xxSpock.groovy:246)
  </code></pre>
  
  <p>Please help me to solve this.</p>