I'd think about a different design of the webservice calls.
You should try to avoid real big results.
Split into more calls.

Something like:
One to get a overview list
Another to get details

Or:
One call to get the size like the SQL count() does
combined with
Add parameters to your to limit the result: like start_at, number_of_results

my 2c

Andrew Bruno schreef:
Hello all

I was wondering how some of you may be dealing with web service calls
that result in extremely large data responses?

I have been struggling in trying to change the way the parsing of the
XML response works, as I am getting out of memory errors

java.lang.OutOfMemoryError: Java heap space
        at org.apache.xmlbeans.impl.store.CharUtil.allocate(CharUtil.java:397)
        at org.apache.xmlbeans.impl.store.CharUtil.saveChars(CharUtil.java:506)
        at org.apache.xmlbeans.impl.store.CharUtil.saveChars(CharUtil.java:419)
        at org.apache.xmlbeans.impl.store.CharUtil.saveChars(CharUtil.java:489)
        at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.text(Cur.java:2911)
        at 
org.apache.xmlbeans.impl.store.Cur$CurLoadContext.stripText(Cur.java:3113)
        at org.apache.xmlbeans.impl.store.Cur$CurLoadContext.text(Cur.java:3126)
        at 
org.apache.xmlbeans.impl.store.Locale.loadXMLStreamReader(Locale.java:1154)
        at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:843)
        at 
org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:826)
        at 
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:231)
        .....

Is there a way to change the parser to use a temp file rather then
trying to buffer the response in memory?

Should I be directing this question to the developers list?

Or should I be thinking differently on solving this problem?

Please any ideas :(

Thank you
Andrew

Reply via email to