cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akitoshi Yoshida (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-6876) Unable to get XML response from org.apache.cxf.message.Message.getContent(InputStream.class)
Date Mon, 25 Apr 2016 08:06:12 GMT

     [ https://issues.apache.org/jira/browse/CXF-6876?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Akitoshi Yoshida resolved CXF-6876.
-----------------------------------
    Resolution: Not A Bug

Message.getContent(InputStream.class) is supposed to return an instance of InputStream and
SequenceInputStream is a valid InputStream. Hence, this is not a bug and I am closing this
ticket.

If you have further questions, the right place to ask your questions or describe your requirement
is the users@cxf mailing list.

Thanks.
Regards, aki

> 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