title: How to accept feign response in application/xml
body: <p>I am invoking 3rd party API which returns a response in XML format.
  As I have not created any POJO to hold response in my consumer service I am using <code>java.lang.Object</code> for same.</p>
  <p>I am getting the below error.</p>
  <pre><code>org.springframework.web.client.UnknownContentTypeException: Could not extract response: no suitable HttpMessageConverter found for response type [class java.lang.Object] and content type [application/xml]
      at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:126) ~[spring-web-5.2.10.RELEASE.jar:5.2.10.RELEASE]
      at org.springframework.cloud.openfeign.support.SpringDecoder.decode(SpringDecoder.java:59) ~[spring-cloud-openfeign-core-2.2.5.RELEASE.jar:2.2.5.RELEASE]
      at org.springframework.cloud.openfeign.support.ResponseEntityDecoder.decode(ResponseEntityDecoder.java:62) ~[spring-cloud-openfeign-core-2.2.5.RELEASE.jar:2.2.5.RELEASE]
  </code></pre>
  <p>My feign client code</p>
  <pre class="lang-java prettyprint-override"><code>@FeignClient(value = &quot;SERVICE&quot;, url = &quot;https://goog.dummyservice/api1/v1&quot;, decode404 = true)
  public interface UserFeign {
  
      @GetMapping(value = &quot;/docs/{profile}/{protocol}&quot;, consumes = MediaType.APPLICATION_XML_VALUE)
      Object getUserData(@RequestHeader(&quot;Authorization&quot;) String token,
                           @PathVariable(&quot;profile&quot;) String profile,
                           @PathVariable(&quot;protocol&quot;) String protocol);
  }
  </code></pre>
  <p>I wanted to know how to hold XML response through feign.</p>