title: Spring FeignClient - Treat RESTful xml response as JSON
body: <p>I'm using Spring FeignClient to access a RESTful endpoint, the endpoint returns an xml, 
  I want to get the response as a JSON, which in turn will map to a POJO. </p>
  
  <pre><code>1) When I access the endpoint on the browser, I get response as below, 
  &lt;ns3:Products xmlns:ns2="http://schemas.com/rest/core/v1" xmlns:ns3="http://schemas/prod/v1"&gt;
  &lt;ProductDetails&gt;
  &lt;ProdId&gt;1234&lt;/ProdId&gt;
  &lt;ProdName&gt;Some Text&lt;/ProdName&gt;
  &lt;/ProductDetails&gt;
  &lt;/ns3:Products&gt;
  
  
  2) @FeignClient(value = "productApi", url = "http://prodservice/resources/prod/v1")
  public interface ProductApi {
  
     @GetMapping(value="/products/{productId}", produces = "application/json")
     ProductDetails getProductDetails(@PathVariable("productId") String productId) 
  
      // where, /products/{productId} refers the RESTful endpoint 
      // by mentioning, produces = "application/json", I believe the response xml would be converted to JSON Java POJO. 
  
  
  3) POJO
  public class ProductDetails {
  private String ProdId;
  private String ProdName;
  
  //...setters &amp; getters 
  } 
  
  4) Service Layer 
  ProductDetails details = productApi.getProductDetails(productId); 
  </code></pre>
  
  <p>In the 'details' object, both ProdId &amp;  ProdName are coming as null. 
  Am I missing anything here? Firstly, Is it possible to get response as JSON instead of XML? </p>