title: How to send a SOAP object with FEIGN client?
body: <p>I'm trying to send a SOAP message via a FEIGN client. The problem is that when I send the java object, what is actually being sent is a request with an xml format, instead of a SOAP format.</p>
  
  <p>The client is configured as follows:</p>
  
  <pre><code>@FeignClient(name = "calculatorServer", url = "http://www.dneonline.com/calculator.asmx")
  public interface AEMWebServiceFeignClient{
  
      @PostMapping(value = "", consumes = MediaType.TEXT_XML, produces = MediaType.TEXT_XML)
      AddResponse calculate(@RequestBody Add addRequest);
  
  }
  </code></pre>
  
  <p>Looking at the log I see that I am really sending this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;Add xmlns="http://tempuri.org/"&gt;
      &lt;intA&gt;2&lt;/intA&gt;
      &lt;intB&gt;0&lt;/intB&gt;
  &lt;/Add&gt;
  </code></pre>
  
  <p>When I really should be sending the following message:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;tem:Add&gt;
           &lt;tem:intA&gt;2&lt;/tem:intA&gt;
           &lt;tem:intB&gt;0&lt;/tem:intB&gt;
        &lt;/tem:Add&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Any help is welcome, thanks!</p>