title: Android SOAP IOException "BufferedInputStream is closed"
body: <p>I am developing an Android application using SOAP webservices. When the response of the request is too long it gives me an IOException on line: <code>androidHttpTransport.call(SOAP_ACTION, envelope);</code></p>
  
  <p>My code:</p>
  
  <pre><code>try {
      SoapObject request = new SoapObject(Constants.NAMESPACE, METHOD_NAME);
  
      SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
      envelope.encodingStyle = "rpc";
      envelope.setOutputSoapObject(request);
  
      HttpTransportSE androidHttpTransport = new HttpTransportSE(Constants.WSDL);
      androidHttpTransport.debug = true;
  
      androidHttpTransport.call(SOAP_ACTION, envelope);
  
      Object result = (Object)envelope.getResponse();
  
      String results = result.toString();
      Log.e(TAG, "Result = "+results);
      return parseJson(results);
  
  } catch (Exception e) {
      Log.e(TAG, "Error with SOAP", e);
      Log.e(TAG, e.getMessage());
      return new ArrayList&lt;Route&gt;();
  }
  </code></pre>
  
  <p>The exception:</p>
  
  <pre><code>12-03 13:52:56.807: E/RoutesLoader(20272): Error with SOAP
  12-03 13:52:56.807: E/RoutesLoader(20272): java.io.IOException: BufferedInputStream is closed
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.io.BufferedInputStream.streamClosed(BufferedInputStream.java:118)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.io.BufferedInputStream.read(BufferedInputStream.java:279)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.util.zip.GZIPInputStream.readFully(GZIPInputStream.java:204)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.java:98)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.java:81)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at org.ksoap2.transport.HttpTransportSE.getUnZippedInputStream(HttpTransportSE.java:274)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:223)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:114)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at eu.akting.bidekide.content.RoutesLoader.downloadRoutes(RoutesLoader.java:51)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at eu.akting.bidekide.content.RoutesLoader.loadInBackground(RoutesLoader.java:36)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at eu.akting.bidekide.content.RoutesLoader.loadInBackground(RoutesLoader.java:1)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:240)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:51)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:40)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:123)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.util.concurrent.FutureTask.run(FutureTask.java:234)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
  12-03 13:52:56.807: E/RoutesLoader(20272):  at java.lang.Thread.run(Thread.java:856)
  12-03 13:52:56.807: E/RoutesLoader(20272): BufferedInputStream is closed
  </code></pre>
  
  <p>Any ideas?
  I have the problem when unzipping the response, but I don't know how to fix it.</p>