I am working with SOAP Parsing in android. In my application there is one point where I have to download large amount of data where byte array type of data are also there.
For the solution I have referred the link Very large SOAP response - Android- out of memory error but not able to get how can it works with my soap object.
The method which I am using to get the soap response is as follows:
public SoapObject taskDetail() {
SoapObject result = null;
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
request.addProperty("ID", "4");
request.addProperty("fromDate", "02/06/2013");
request.addProperty("toDate", "02/06/2013");
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
AndroidHttpTransport transport = new AndroidHttpTransport(URL);
transport.debug = true;
try {
transport.call(SOAP_ACTION, envelope);
result = (SoapObject)envelope.getResponse();
for(int i=0; i<result.getPropertyCount(); i++) {
SoapObject view_task_master = (SoapObject) result.getProperty(i);
screen = view_task_master.getProperty("Screen").toString();
Log.i("screen",screen);
date = view_task_master.getProperty("Createddate").toString();
Log.i("date",date);
}
}
catch (IOException e) {
Log.i("IOException",e.getMessage());
}
catch (XmlPullParserException e) {
Log.i("XMLPullParserException",e.getMessage());
}
return result;
}
I know the main problem is that because of the large data the result object can't handle it.
Please help...Thanks in advance...!!