JAXRSOutInterceptor throws ClassCastException with ContentTypeOutInterceptor
----------------------------------------------------------------------------

                 Key: CXF-2715
                 URL: https://issues.apache.org/jira/browse/CXF-2715
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.2.6
         Environment: Windows XP SP3
jdk1.5.0_15
Tomcat 5.5
Spring 2.5.6
            Reporter: Uttam Phalnikar


In my spring xml If I use ContentTypeOutInterceptor with following syntax
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        <jaxrs:server ...>
                ...
                <jaxrs:inInterceptors>
                        <bean 
class="org.apache.cxf.binding.http.interceptor.ContentTypeOutInterceptor"/>
                </jaxrs:inInterceptors>
                ...
        </jaxrs:server
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Then that results into ClassCastException. The Exception is thrown by following 
code from serializeMessage method of JAXRSOutInterceptor.java
>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        MultivaluedMap<String, Object> responseHeaders = 
            (MultivaluedMap)message.get(Message.PROTOCOL_HEADERS);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<

It seems the ContentTypeOutInterceptor uses HashMap object to store 
Message.PROTOCOL_HEADERS value, but JAXRSOutInterceptor expects MultivaluedMap.

My feeling is we should fix ContentTypeOutInterceptor. But as I am new to CXF, 
I am filing a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to