http://stackoverflow.com/questions/...5943816-byte-allocation-when-accessing-xml-s#
In my application, i am using ksoap2 for retrieving data from .net web service. Data which we are transferring is in format called "xml string". It works fine if i accesses 1000 item records. But When i am trying to access 12000 item records from server it is giving "Out of memory on an 5943816 byte allocation" error in my logcat.
////////////////// My code for retrieving data from server,
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); request.addProperty("myparameter", myparameter); envelope.dotNet = true;// to handle .net services asmx/aspx envelope.setOutputSoapObject(request); HttpTransportSE ht = new HttpTransportSE(MyURL); ht.debug = true; ht.call(SOAP_ACTION, envelope); // to change dialog publishProgress("Moving data file"); SoapObject resultString = (SoapObject) envelope.getResponse(); //////////////////
I know that this is because of heap size problem. But i dont know how to solve this, If any one have solution for this please help me..
In my application, i am using ksoap2 for retrieving data from .net web service. Data which we are transferring is in format called "xml string". It works fine if i accesses 1000 item records. But When i am trying to access 12000 item records from server it is giving "Out of memory on an 5943816 byte allocation" error in my logcat.
////////////////// My code for retrieving data from server,
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); request.addProperty("myparameter", myparameter); envelope.dotNet = true;// to handle .net services asmx/aspx envelope.setOutputSoapObject(request); HttpTransportSE ht = new HttpTransportSE(MyURL); ht.debug = true; ht.call(SOAP_ACTION, envelope); // to change dialog publishProgress("Moving data file"); SoapObject resultString = (SoapObject) envelope.getResponse(); //////////////////
I know that this is because of heap size problem. But i dont know how to solve this, If any one have solution for this please help me..