Hello,
I'm somewhat of a Web Services newbie. I am trying to modify an existing web service that FTPs a CSV file from a legacy system, reads through it, and writes some XML out to the web service. It is pretty top-down in that (for the most part) it reads a line of CSV, writes out a chunk of XML, rinse, repeat.
We are using Apache Axis 1.4 and what appears to happen is that Axis / Apache builds the whole
String in memory before writing out the response.
Because the files we are sending are quite large, we occasionally run out of memory while processing them. As part of the rewrite of the service, I'm being asked to rewrite the service so that it takes up less memory.
In doing a bit of reading around I have come across the concept that for large files, the best practice is to use SAAJ / attachments.
I was wondering if anyone had any pointers to some good introductory lessons on that? I've read
http://java.sun.com/webservices/docs/2.0/tutorial/doc/ but most of the examples I see there have explicit SoapMessage and AttachmentPart objects in the code - all the code I am trying to re-use has all of that abstracted by Axis.
Thanks for reading and feel free to ask clarifying questions. I'll be the first to admit I only have a rudimentary grasp of this.