You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anand Navale <na...@novell.com> on 2009/09/04 05:20:46 UTC

Re: Copying received large web service response objects to file system

Thanks Amila. The suggestion is really useful. Would also like to know if there is any recommended approach when dealing with large web service response objects using Axis2 as web service client. 
 
Thanks
Anand Navale


>>> Amila Suriarachchi <am...@gmail.com> 9/3/2009 1:34 PM >>>


On Thu, Sep 3, 2009 at 1:21 PM, Anand Navale <na...@novell.com> wrote:


Hi,

We are using Axis2 1.4 (on JRE 5 runtime) as web service client for our application. One of the web services requires handling massive objects in the response. Right now we are getting out of memory error whenever we receive large web service response. Modifying the web service or increasing the JVM heap size is not an option for us. Does Axis2 web service client framework provide any mechanism for copying the received web service response to the file system and not build the entire response object in memory. Then in our application we could read the response from the file.

yes. then you can not use data binding.

you can use a ServiceClient to send and receive OM Elements. Axiom works in pull parsing. i.e it does not build the envelope until you call for. Once you have the OMElement you can get the xml stream reader and write it to the file system.

thanks,
Amila.




Thanks in advance,
Anand Navale.



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/