Axiom
  1. Axiom
  2. AXIOM-413

MTOM and 7bit encoding attachment not fully read when attachment cache is enabled

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Hi,

      I have a MTOM message where the part containing the attachment is with content type text/plain and the content transfer encoding is 7bit. My Skeleton is storing the content of the attachment in a file:

      try

      { DataHandler dh = sendClaim.getData(); File outFile = new File("g:/stored_axis2.txt"); FileOutputStream fileOutputStream = new FileOutputStream(outFile); dh.writeTo(fileOutputStream); fileOutputStream.close(); }

      catch (Exception e) {}

      File cache is enabled, with very small threshold size:

      <parameter name="cacheAttachments">true</parameter>
      <parameter name="attachmentDIR">G:\ant</parameter>
      <parameter name="sizeThreshold">1</parameter>

      The request looks like this:

      POST http://localhost:8080/axis2/services/ClaimService HTTP/1.1
      Accept-Encoding: gzip,deflate
      SOAPAction: "http://example.com/soapaction"
      Content-Type: multipart/related; type="application/xop+xml"; start="<rootpart@soapui.org>"; start-info="text/xml"; boundary="----=_Part_7_31148936.1331293159184"
      MIME-Version: 1.0
      User-Agent: Jakarta Commons-HttpClient/3.1
      Host: localhost:8080
      Content-Length: 999

      ------=_Part_7_31148936.1331293159184
      Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
      Content-Transfer-Encoding: 8bit
      Content-ID: <rootpart@soapui.org>

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://example.com/wsdl">
      <soapenv:Header/>
      <soapenv:Body>
      <wsdl:SendClaim>
      <data><inc:Include href="cid:973197553864" xmlns:inc="http://www.w3.org/2004/08/xop/include"/></data>
      </wsdl:SendClaim>
      </soapenv:Body>
      </soapenv:Envelope>
      ------=_Part_7_31148936.1331293159184
      Content-Type: text/plain; charset=us-ascii; name=rand_text.txt
      Content-Transfer-Encoding: 7bit
      Content-ID: <973197553864>
      Content-Disposition: attachment; name="rand_text.txt"; filename="rand_text.txt"

      Some random text Some random text Some random text
      -----=_Part_7_31148936.1331293159184-

      In the resulting file, I have only this:

      S

      If I disable the attachment cache, I get the full text in the attachment. So this issue seems to be related to this cache.

      Any help would be appreciated.

        Issue Links

          Activity

          Hide
          Andreas Veithen added a comment -

          This looks like a duplicate of AXIOM-61.

          Show
          Andreas Veithen added a comment - This looks like a duplicate of AXIOM-61 .

            People

            • Assignee:
              Unassigned
              Reporter:
              Gergan Dimitrov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development