title: Jmeter trim whitespaces from a SOAP Request
body: <p>I have a scenario where I have sample request in SOAP UI and I want to run those webservice in JMeter.</p>
  
  <p>The issue I have encountered is as follows:</p>
  
  <p>In SOAP UI, we have property "Strip Whitespaces". When set to true, I get the expected output.
  However in JMeter, there is no such property hence my request via JMeter are not successful.</p>
  
  <p>Is there anyway to strip whitespaces from whole request not just from variables in JMeter.
  Can BeanShell Preprocessor help me?</p>
  
  <p>The sample request which doesnot work in JMETER is something like this:</p>
  
  <pre><code>      &lt;Envelope&gt;
              &lt;Header&gt;ABC&lt;/Header&gt;
              &lt;Body&gt;
                   &lt;Param1&gt;&lt;/Param1&gt;
                   &lt;Param2&gt;&lt;/Param2&gt;
               &lt;/Body&gt;
        &lt;/Envelope&gt;
  </code></pre>
  
  <p>The sample request which works and give expected output in JMeter is:</p>
  
  <pre><code>&lt;Envelope&gt;&lt;Header&gt;ABC&lt;/Header&gt;&lt;Body&gt;&lt;Param1&gt;&lt;/Param1&gt;&lt;Param2&gt;&lt;/Param2&gt;&lt;/Body&gt;/Envelope&gt;
  </code></pre>