[
https://issues.apache.org/jira/browse/CXF-3253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-3253.
------------------------------
Resolution: Fixed
Fix Version/s: 2.3.3
Assignee: Daniel Kulp
> LocalConduit with DirectDispatch does not work with interceptors that
> decorate the OutputStream
> -----------------------------------------------------------------------------------------------
>
> Key: CXF-3253
> URL: https://issues.apache.org/jira/browse/CXF-3253
> Project: CXF
> Issue Type: Bug
> Components: Transports
> Affects Versions: 2.2.10, 2.3.1
> Environment: Found in CXF 2.2.10, confirmed the code is the same in
> 2.3.1
> Windows 2003 Server x64
> Reporter: Sven Zethelius
> Assignee: Daniel Kulp
> Fix For: 2.3.3
>
>
> Create a Client that uses the local transport.
> Set property org.apache.cxf.transport.local.LocalConduit.directDispatch
> Add an Out interceptor to the Client that decorates the OutputStream. For
> example GZIPOutInterceptor.
> Expected:
> decorated OutputStream to work.
> Actual:
> ClassCastException
> Cause:
> {code:title=org.apache.cxf.transport.local.LocalConduit.dispatchDirect(Message)}
> CachedOutputStream stream =
> (CachedOutputStream)message.getContent(OutputStream.class);
> {code}
> This code is assuming the message OutputStream hasn't been wrapped. My
> suggested fix would be to store the CachedContentStream you need to
> manipulate as a property of the Message, in addition to the setContent, so
> that even if the setContent is manipulated the other property would still be
> available.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira