How to send XML POST requests with Spring RestTemplate?
<p>Is it possible to send <code>XML</code> <code>POST</code> requests with <code>spring</code>, eg <code>RestTemplate</code>?</p>

<p>I want to send the following xml to the url <code>localhost:8080/xml/availability</code></p>

<pre><code>&lt;AvailReq&gt;
  &lt;hotelid&gt;123&lt;/hotelid&gt;
&lt;/AvailReq&gt;
</code></pre>

<p>Also do I want to add custom http headers on each request dynamically(!).</p>

<p>How could I achieve this with spring?</p>