title: SOAP - Very large XML response - OutOfMemoryError
body: <p><em>First, this question looks like</em> <a href="https://stackoverflow.com/questions/4941581/very-large-soap-response-android-out-of-memory-error/6925619#6925619"><em>Very large SOAP response - Android- out of memory error</em></a> <em>subject. Because of my English weakness and the similarity of this problem, with a view to facilitate understanding some statement passages were copied.</em></p>
  
  <p>I have an application where i need to download a large amount of data via a SOAP call to a webservice. The response is then sent to a function which display the XML file.</p>
  
  <p>The data is more than 11MB in size and i have a <em>java.lang.OutOfMemoryError</em> everytime.</p>
  
  <p>Modifying the webservice to give out smaller amounts of data is not an option.</p>
  
  <p>I use "Http request" to get datas. I know that : my resquest is fine, soapUi and wireshark return expected responses.</p>
  
  <p>But my AVD isn't able to pass this line</p>
  
  <p><code>HttpResponse httpResponse = httpClient.execute(httpPost);</code> </p>
  
  <p>After some minutes of work (during which wireshark recovers some expected queries) this error is made</p>
  
  <pre><code> Out of memory on a 16705124-byte allocation.
  </code></pre>
  
  <p>I tried to upgrade the SD card size to 20GB, yet, error still.</p>
  
  <p>Parsing httpResponse is probably the next step, is it possible to parse HttpResponse while it receives data by fragmenting it into several parts by exmple?</p>
  
  <p>Do you have an idea ?</p>
  
  <p>Thanks,
  Dsandre</p>