Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2440

GZIP and MTOM attachments does not work on client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.6, 2.2.3
    • 2.1.7, 2.2.4
    • Transports
    • None
    • Unknown

    Description

      Service is set up to use GZIP compression by adding GZIPFeature to ClientProxyFactoryBean (or JaxWsProxyFactoryBean) and ServerFactoryBean (or JaxWsServerFactoryBean). It provides possibility to download MTOM attachments. On client side files can not be read and following exception is thrown:

      java.io.IOException: stream is closed
      at sun.net.www.http.ChunkedInputStream.ensureOpen(ChunkedInputStream.java:151)
      at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:646)
      at java.io.FilterInputStream.read(FilterInputStream.java:116)
      at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2446)
      at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:221)
      at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
      at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
      at java.io.FilterInputStream.read(FilterInputStream.java:116)
      at java.io.PushbackInputStream.read(PushbackInputStream.java:169)
      at org.apache.cxf.attachment.MimeBodyPartInputStream.read(MimeBodyPartInputStream.java:74)
      at java.io.InputStream.read(InputStream.java:85)
      at org.apache.cxf.attachment.DelegatingInputStream.read(DelegatingInputStream.java:82)
      at Main.runTests(Main.java:107)
      at Main.main(Main.java:120)

      On the server side everything is fine. It reproduces for both 2.2.3 and 2.1.6 versions of CXF. Please see attached test case.

      Attachments

        1. cxf-test.zip
          46 kB
          Vitaly V. Litvak

        Activity

          People

            dkulp Daniel Kulp
            vitaly_litvak Vitaly V. Litvak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: