Hello all,

This is my first post to the Axis2 mailing list.  I hope this is the
correct list to post this kind of problem.

I have been using Axis2 for talking to Exchange Web Services (EWS).

Everything has been going well so far, except that I hit a hurtle
today during testing.

When retrieving a large email via Axis, I get an Out Of Memory.

Looking at the code, it is expected that this would occur, as
converting a very large stream into a String will eventually always
cause Out Of Memory errors.  This happens deep in the Axis/Xmlbeans
code

Caused by: 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)
        at 
com.microsoft.schemas.exchange.services._2006.messages.GetItemResponseDocument$Factory.parse(GetItemResponseDocument.java:153)
        at 
com.microsoft.schemas.exchange.services._2006.messages.ExchangeServiceStub.fromOM(ExchangeServiceStub.java:9181)
        at 
com.microsoft.schemas.exchange.services._2006.messages.ExchangeServiceStub.GetItem(ExchangeServiceStub.java:3077)

The stub code generated does not give me access to a stream.  Does
anyone know if I can access the stream deeper, or tell Axis to return
a stream rather then the XML object that has String method.

I hope you dont mind the cross posting, but here is a post with the
microsoft forum:

http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/469610b8-a288-41f4-aede-afadb0a289bd

Thank you
Andrew

Reply via email to