Mr J,

But its just one data element that I need, so there is no concept many rows,
etc.

As a matter of fact, I am breaking up the call in 2 calls, one for all the
metadata, and one for the actual mime content.

i.e.

  <m:ResponseMessages>
    <m:GetItemResponseMessage ResponseClass="Success">
      <m:ResponseCode>NoError</m:ResponseCode>
      <m:Items>
        <t:Message>
          <t:MimeContent CharacterSet="UTF-8">RnJvbTogTGVlIF..... large mime
base64 encoded email......... 120Meg++ of encoded data</t:MimeContent>
....

I only ever request one message at a time.  Its just that when the
MimeContent is greater then 10Meg, OutOfmemory occurs.

It appears to be the case because the parse loads all the content into
memory.

In theory, this element can have data of any size coming back.




On Mon, May 18, 2009 at 6:54 PM, J. Hondius <[email protected]> wrote:

> 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