title: Sending a XML file via POST to a RESTful service in Java
body: <p>I need to send a XML file using POST to a web service. I have a client application that creates a XML file which stores all the information required to send to the web application, but I am not sure how to go about sending it.</p>
  
  <p>My XML looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;Comment&gt;
    &lt;Poll_ID&gt;2&lt;/Poll_ID&gt;
    &lt;Name&gt;wpoon&lt;/Name&gt;
    &lt;Text&gt;asdasdas&lt;/Text&gt;
    &lt;Timestamp&gt;2012-10-14T10:30:25&lt;/Timestamp&gt;
  &lt;/Comment&gt;
  </code></pre>
  
  <p>And the RESTful service I will be sending it to has the URL:</p>
  
  <pre><code>http://localhost:8080/TESTINGrestful/rest/polls/comment
  </code></pre>
  
  <p>Could anyone advise me how to do this, any help would be appreciated.</p>