title: java.lang.IllegalArgumentException : ' is not a valid XML character
body: <p>I am calling .net webservice in JAVA class which will read string from text file and UTF8 encode that and return that string to JAVA .Some times the correct output is coming . but sometimes this is giving illegal argument exception eventhough the text in text file is in correct format .
   Below is the exception I am getting:</p>
  
  <pre><code>**SEVERE: Servlet.service() for servlet BaseController threw exception
  java.lang.IllegalArgumentException: The char '0x0' after 'return code:  502
  &lt;HEAD&gt;&lt;TITLE&gt;Parent proxy is not responding&lt;/TITLE&gt;&lt;/HEAD&gt;
  &lt;BODY BGCOLOR="white" FGCOLOR="black"&gt;&lt;H1&gt;Parent proxy is not responding&lt;/H1&gt;&lt;HR&gt;
  &lt;FONT FACE="Helvetica,Arial"&gt;&lt;B&gt;
  Description: Parent proxy is not responding&lt;/B&gt;&lt;/FONT&gt;
  &lt;HR&gt;
  &lt;!-- default "Parent proxy is not responding" response (502) --&gt;
  &lt;/BODY&gt;
  ' is not a valid XML character.
      at org.apache.axis.components.encoding.AbstractXMLEncoder.encode(AbstractXMLEncoder.java:110)
      at org.apache.axis.utils.XMLUtils.xmlEncodeString(XMLUtils.java:131)
      at org.apache.axis.utils.DOM2Writer.normalize(DOM2Writer.java:344)
      at org.apache.axis.utils.DOM2Writer.print(DOM2Writer.java:246)
      at org.apache.axis.utils.DOM2Writer.print(DOM2Writer.java:208)
      at org.apache.axis.utils.DOM2Writer.serializeAsXML(DOM2Writer.java:77)
      at org.apache.axis.utils.DOM2Writer.serializeAsXML(DOM2Writer.java:60)
      at org.apache.axis.utils.DOM2Writer.nodeToString(DOM2Writer.java:49)
      at org.apache.axis.utils.XMLUtils.privateElementToString(XMLUtils.java:433)
      at org.apache.axis.utils.XMLUtils.ElementToString(XMLUtils.java:442)
      at org.apache.axis.utils.XMLUtils.getInnerXMLString(XMLUtils.java:542)
      at org.apache.axis.AxisFault.dumpToString(AxisFault.java:388)
      at org.apache.axis.AxisFault.printStackTrace(AxisFault.java:789)
      at java.lang.Throwable.printStackTrace(Throwable.java:451)
      at com.hcl.webservice.BaseController.doPost(BaseController.java:155)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Thread.java:680)
  **
  </code></pre>
  
  <p>Please help in solving this problem.
  Thanks in advance</p>