Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4707

Axis2 cannot transfer file from server to client (downloading) with MTOM

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.5.1
    • None
    • transports
    • code is tested on the Axis2 web server and Jboss 5.1.

    Description

      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.

      Thanks,
      Tao

      Attachments

        1. mtom.zip
          167 kB
          Tao Gui
        2. mtomdownload.txt
          0.9 kB
          Tao Gui
        3. mtomupload.txt
          2 kB
          Tao Gui

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            taogui Tao Gui

            Dates

              Created:
              Updated:

              Slack

                Issue deployment