Closed GoogleCodeExporter closed 9 years ago
If the file is to big to be parsed from the network when it is sent it would
also be too big to be parsed from disk so what would be the point of saving the
xml?
If you xml response is too large you should refactor the webservice to support
paged data or find some other way to reduce the response size imho.
Original comment by mosa...@gmail.com
on 10 Oct 2012 at 6:08
It's not true. If i can save the xml file on disk, i can read it depending on
free VM space available. So, if data are huge, i can, for example, split it in
multiple file and read and parse one mini-file time by time and then clear
memory every time i finished to parse it, and go to second one doing the same.
However i solved the problem modifying by myself HTTPtransportSE file by
introducing a static boolean by which i can choose if to save directly on VM
memory (default behaviour) or if to save on disk
Original comment by giuseppe...@gmail.com
on 10 Oct 2012 at 8:00
Fair enough. Care to share that improvement with the rest of us as a patch or
pull request?
Original comment by mosa...@gmail.com
on 10 Oct 2012 at 2:47
I left how i implemented code here:
http://stackoverflow.com/questions/4941581/very-large-soap-response-android-out-
of-memory-error/12732396#12732396
Look for kinghomer's response (it's me).
Original comment by giuseppe...@gmail.com
on 10 Oct 2012 at 2:53
I think It would be feasible to implement this as an alternative storing the
xml where the File is passed into the transport in the constructor or as a
parameter with some sort of flag that triggers the saving of the xml file. I
will take a pull request if you send one ;-)
Original comment by mosa...@gmail.com
on 10 Oct 2012 at 7:58
I have implemented this in master now. Please try it and let me know if that
works for you.
Original comment by mosa...@gmail.com
on 12 Nov 2012 at 7:41
I think this issue is more deeper than just OOM raised because of huge
response.
Sometimes I caught OOM exceptions. But it looks very strange. For example, I
request 10M response from server and all is OK. After that I KILL application
and start it and request 10M again and so on.
In this test case I will receive OOM exception after iteration 5 or more.
My be it should be interpreted as memory leak in Android?
Original comment by anatoliy...@gmail.com
on 13 Nov 2012 at 9:16
I think problem is that memory is not cleaned as well after data is consumed.
I put in HttpTransportSE class file a call to these functions:
arrayOfDataDownloaded = null;
System.gc();
By this call i solved that problem. Btw, problem is always huge response. Every
device dedicates a specific and equal amount of Memory for each application.
For example, S3 dedicates 48Mb-Ram foreach App because has 1gb Ram memory.
Another device that has 512Mb-Ram dedicates 24Mb. This fact cause why App
doens't work on all devices.
This is where i think problem is.
Original comment by giuseppe...@gmail.com
on 13 Nov 2012 at 10:28
Good to see that this issue is closed already.
When can we expect the latest JAR? Tentative Date ?
Or Shall we download and compile the latest code?
Original comment by Abba...@ivymobility.com
on 24 Jan 2013 at 9:22
Released with 3.0.0
Original comment by mosa...@gmail.com
on 5 Mar 2013 at 7:11
Releasing now.
Original comment by mosa...@gmail.com
on 5 Mar 2013 at 7:50
[deleted comment]
[deleted comment]
Hi guys. I tested new release and it works fine with file, but.... seems there
is a problem in text format (this problem occurs only if i use call() method to
save response on file too). For example, if WS response is an Xml String, in
which open and close tag are rappresented by special characters like "<" and
">" or "<" and ">", occurs an XmlPullParser Exception. If WS response is simple
text like "GUID", there is no error but happen this:
Example with classical call() method -> httpTransport.call(soapAction,
Envelope). Response dump is:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><ValidateUserResponse xmlns="http://tempuri.org/">
<ValidateUserResult>GUID</ValidateUserResult>
</ValidateUserResponse>
</s:Body>
</s:Envelope>
Example with new call() method (i set header's List to null) ->
httpTransport.call(soapAction, Envelope, null, File). Response dump is:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body><ValidateUserResponse xmlns="http://tempuri.org/">
<ValidateUserResult>GUID</ValidateUserResult>
</ValidateUserResponse>
</s:Body>
</s:Envelope>�����������������������
���
As you can see, something is written after Envelope node is closed.
This "something", instead, seems that's not written in file.
Original comment by giuseppe...@gmail.com
on 6 Mar 2013 at 12:01
Can you file this as a separate new issue and maybe figure out what is going on
and send a fix as pull request?
Original comment by mosa...@gmail.com
on 6 Mar 2013 at 4:08
Problem is that i can't find source code. If i go here:
https://github.com/mosabua/ksoap2-android/tree/
i can't find java files. Directories seem empties
Original comment by giuseppe...@gmail.com
on 6 Mar 2013 at 4:21
What are you talking about .. its all there.. e.g.
https://github.com/mosabua/ksoap2-android/blob/master/ksoap2-base/src/main/java/
org/ksoap2/SoapEnvelope.java
Original comment by mosa...@gmail.com
on 6 Mar 2013 at 6:29
Sorry, i didn't see it. Too work turned me stupid
Original comment by giuseppe...@gmail.com
on 6 Mar 2013 at 6:43
Original issue reported on code.google.com by
giuseppe...@gmail.com
on 3 Oct 2012 at 5:02