title: Retrifit and simpleXMLConverter
body: <p>I've been trying to use Retrofit with an API which works with XML. I also notice that retrofit have an XML Converter called SimpleXmlConverter here:</p>
  
  <p><a href="https://github.com/mobile-professionals/retrofit-simplexmlconverter" rel="nofollow">https://github.com/mobile-professionals/retrofit-simplexmlconverter</a></p>
  
  <p>But when I tried to use it, got this error:</p>
  
  <pre><code>FATAL EXCEPTION: Thread-14844
  retrofit.RetrofitError: retrofit.converter.ConversionException: java.lang.ClassCastException: org.apache.harmony.luni.lang.reflect.ImplForType cannot be cast to java.lang.Class
          at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:409)
          at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:284)
          at com.aaaa.common.$Proxy0.configs(Native Method)
          at com.aaaa.common.DemoAPI.getContributos(DemoAPI.java:47)
          at com.aaaa.MainActivity$1.run(MainActivity.java:27)
          at java.lang.Thread.run(Thread.java:841)
   Caused by: retrofit.converter.ConversionException: java.lang.ClassCastException: org.apache.harmony.luni.lang.reflect.ImplForType cannot be cast to java.lang.Class
          at retrofit.converter.SimpleXMLConverter.fromBody(SimpleXMLConverter.java:38)
          at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:394)
  </code></pre>
  
  <p>            </p>
  
  <pre><code>at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:284)
              at com.aaaa.common.$Proxy0.configs(Native Method)
              at com.aaaa.common.DemoAPI.getContributos(DemoAPI.java:47)
              at com.aaaa.MainActivity$1.run(MainActivity.java:27)
              at java.lang.Thread.run(Thread.java:841)
      Caused by: java.lang.ClassCastException: org.apache.harmony.luni.lang.reflect.ImplForType cannot be cast to java.lang.Class
              at retrofit.converter.SimpleXMLConverter.fromBody(SimpleXMLConverter.java:36)
              at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:394)
              at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:284)
              at com.aaaa.common.$Proxy0.configs(Native Method)
              at com.aaaa.common.DemoAPI.getContributos(DemoAPI.java:47)
              at com.aaaa.MainActivity$1.run(MainActivity.java:27)
              at java.lang.Thread.run(Thread.java:841)
  </code></pre>
  
  <p>I'm making a sample App so I'm just trying to be simple with my code:</p>
  
  <pre><code>RestAdapter restAdapter = new RestAdapter.Builder()
              //.setEndpoint(API_URL)
              .setServer(API_URL)
              .setConverter(new SimpleXMLConverter())
              .build();
  </code></pre>
  
  <p>And</p>
  
  <pre><code>static class Config {
      String name;
      int firstInt;
      int secondInt;
  }
  
  interface Demo {
      @GET("/{user}/api/config")
      List&lt;Config&gt; configs (
              @Path("user") String owner
      );
  }
  </code></pre>