title: SOAP service using Spring. Escaping special characters
body: <p>I have a SOAP web service developed using Spring framework. Whenever the request contains some invalid data i need to display error message like below</p>
  
  <pre><code>Error occurred. Invalid data for &lt;Field Name&gt;.
  </code></pre>
  
  <p>So my code looks as below for name validation. This error will be sent as response wheneve no value passed for the name field.</p>
  
  <pre><code>Assert.notNull(name, "Error occurred. No value passed for the field &lt;name&gt;. ");
  </code></pre>
  
  <p>So what i expected as out out is</p>
  
  <pre><code>Error occurred. No value passed for the field &lt;name&gt;.
  </code></pre>
  
  <p>But the response in SOAP UI was like below.</p>
  
  <pre><code>Error occurred. No value passed for the field &amp;lt;name&gt;.
  </code></pre>
  
  <p>How to display the proper &lt; symbol in SOAP UI? I tried CDATA. But not sure how the receiver process the request with CDATA.</p>
  
  <p>With CDATA message in SOAP UI was like below </p>
  
  <pre><code>Error occurred. No value passed for the field &lt;![CDATA[&lt;]]name&gt;.
  </code></pre>