I would like to send large files from the server to the client using MTOM and Spring WS. I realize that this isn't the best approach for this type of thing, but it's a requirement. I have MTOM set up and it works great for small files around 50mb. I am experiencing out of memory errors for larger files and by changing different heap space sizes, I can send slightly larger files, but nothing close to 1gb. 1GB is my test case for this. How can I stream or chunk the MTOM service from the server to the client? I am using Java 6 update 17, Tomcat 6, and Spring WS 1.5.7 with the SaajSoapMessageFactory.
I found an example of streaming with jax-ws, but I'm not sure how to incorporate this into a Spring WS endpoint.