title: how to Remove (&lt;) and ([CDATA[[) from SOAP response using java?
body: <p>please help me out for the below problem, i am trying since long time(3 weeks) but not able to get the proper resolution.I have to complete it ASAP ,as my so many webservice output depends on the custom return string.</p>
  
  <p>I have written java code using javax.jws.</p>
  
  <pre><code>import javax.jws.WebMethod;
  import javax.jws.WebParam;
  import javax.jws.WebResult;
  import javax.jws.WebService;
  import javax.jws.soap.SOAPBinding;
  import javax.jws.soap.SOAPBinding.Style;
  import javax.jws.soap.SOAPBinding.Use;
  
      String returnStr = null;
  
      String responseCodeStart = "&lt;responseCode&gt;";
      String responseCodeEnd = "&lt;/responseCode&gt;";
      String responseMessageStart = "&lt;responseMessage&gt;";
      String responseMessageEnd = "&lt;/responseMessage&gt;";
  </code></pre>
  
  <p><strong>Return Custom String in JAVA to SOAP response/Output String :::::::::</strong></p>
  
  <pre><code> returnStr = "\r\n" + responseCodeStart + "1000" + responseCodeEnd + "\r\n" + responseMessageStart + "Registration successful&gt;&gt;" + responseMessageEnd + "\r\n";
  </code></pre>
  
  <p><strong>Problem :</strong></p>
  
  <pre><code>1)  I am getting (&amp;lt;) tag instead of (&lt;)
  2) I am getting ([CDATA[[) tag in response.
  </code></pre>
  
  <p><strong>SOAP RESPONSE :</strong></p>
  
  <pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
     &lt;soap:Body&gt;
        &lt;ns2:registerUserResponse xmlns:ns2="http://impl.timecapsule.com/"&gt;
           &lt;return&gt;&amp;lt;responseCode&gt;1102&amp;lt;/responseCode&gt;
  &amp;lt;responseMessage&gt; [!CDATA[[Please provide username] &amp;lt;/responseMessage&gt;&lt;/return&gt;
        &lt;/ns2:registerUserResponse&gt;
     &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>*<strong><em>Resolution needed:</em>*</strong> </p>
  
  <pre><code>    1) &amp;lt; to remove
      2) CDATA to remove
  
  I want to retrieve it as XML object instead of String using java code.
  
  
  THANKS
  </code></pre>