Hi, Axis2 Dev Team,
Axis2 cannot transfer file from server to client (downloading) with MTOM for me. The transfer also fails if the file is bigger than 10MB.
Axis2 has a sample code (\mtom) to transfer a file from client to server (uploading, called attachement in the code) with MTOM. It works for me and can transfer file up to 10GB. I added the function to download the file (from server to client, please see the attached code.). Using TCPMON, i see the data being downloaded is "Content-Transfer-Encoding: 8bit" (please see attached mtomdownload.txt), not "binary" as for the data uploaded (please see attached mtomupload.txt). If MTOM is working, it should be "binary". When the file being downloaded is bigger than 10MB, client will throw OutOfMemery.
I tested the code on the Axis2 web server and Jboss 5.1.
I also tried Thilina's code to download with MTOM , http://thilinag.blogspot.com/2008/04/download-file-from-axis2-web-service.html. The data is not downloaded as binary either.
Furthermore, the attachment caching only works for me on the server side. Configuring attachment caching on the client (setting setProperty(Constants.Configuration.CACHE_ATTACHMENTS, Constants.VALUE_TRUE) and setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR, "c:\\temp\\axistmp2
")) doesn't work and doesn't have any effect (no cache file generated) for me either.