Make sure you stream the file.

I use SpringWS on the server side and Axis2 in the client side for
downloading files. In the server side, I spawn a new thread to write
the attachment portion using PipedInputStream/PipedOutputStream.

To do an upload, I would do the same. Spawn a new thread to read the
attachment using  PipedInputStream/PipedOutputStream from the stream
obtained from the DataHandler, connect the piped streams to the
FileInputStream you use to read the file.

-Jorge



On Fri, Jul 8, 2011 at 6:31 AM, Bhat B, Niranjan (NSN - IN/Bangalore)
<niranjan.bha...@nsn.com> wrote:
>
> Hi All,
>
> Recently I had a use case of attaching a huge attachment file(around 500 MB) 
> in the request to a webservice.
> But however, when I tried to do this I see out of memory errors in 
> application logs.
> Can you please let me know the efficient way of attaching huge attachment 
> files in the request to a webservice ?
> I am using SWA attachment APIs.
>
> regards,
> Niranjan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to