title: Jmeter - How to send XML request to a server?
body: <p>I have a HTTP Request Sampler in my test plan. I have given my server name or IP, port and url. I chose the Body Data tab and gave an XML request in this way:</p>
  
  <pre><code>&lt;Request&gt;
      &lt;Header&gt;&lt;Log&gt;&lt;Level&gt;None&lt;/Level&gt;&lt;/Log&gt;&lt;/Header&gt;
      &lt;Body&gt;
          &lt;Action&gt;
              &lt;GetService&gt;
                  &lt;Code&gt;ABC&lt;/Code&gt;
                  &lt;CodeValue&gt;XYZ&lt;/CodeValue&gt;
              &lt;/GetService&gt;
          &lt;/Action&gt;
      &lt;/Body&gt; &lt;/Request&gt;
  </code></pre>
  
  <p>However, this what I am getting back the following as the Sampler result:</p>
  
  <blockquote>
    <p>Response code: Non HTTP response code: java.net.ConnectException
    Response message: Non HTTP response message: Connection refused</p>
    
    <p>Response headers:</p>
    
    <p>HTTPSampleResult fields: 
    ContentType:<br>
    DataEncoding: null</p>
  </blockquote>
  
  <p>I have made sure that I can ping my server. Its up and running. </p>
  
  <p>Is there something else that I am missing here?</p>
  
  <p>Thanks in advance!</p>