cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "pravin deore (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-6876) Unable to get XML response from org.apache.cxf.message.Message.getContent(InputStream.class)
Date Thu, 21 Apr 2016 19:37:25 GMT
pravin deore created CXF-6876:
---------------------------------

             Summary: Unable to get XML response from org.apache.cxf.message.Message.getContent(InputStream.class)
                 Key: CXF-6876
                 URL: https://issues.apache.org/jira/browse/CXF-6876
             Project: CXF
          Issue Type: Bug
            Reporter: pravin deore


In the version 2.7.8 

org.apache.cxf.message.Message.getContent(InputStream.class) used to return the InputStream
object but with version 3.0.5 we are now getting the SequenceInputStream object ,and there
is no way to get the inputstream from it. 

Issue is because of code change being made in "LoggingInInterceptor" class 
logInputStream(message, is, buffer, encoding, ct) method which contains the following code


//only copy up to the limit since that's all we need to log
            //we can stream the rest
            IOUtils.copyAtLeast(bis, bos, limit == -1 ? Integer.MAX_VALUE : limit);
            bos.flush();
            bis = new SequenceInputStream(bos.getInputStream(), bis);
            
            // restore the delegating input stream or the input stream
            if (is instanceof DelegatingInputStream) {
                ((DelegatingInputStream)is).setInputStream(bis);
            } else {
                message.setContent(InputStream.class, bis);
            }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message