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

ClassCastException in JAXRSOutInterceptor.serializeMessage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.2
    • 2.2.3
    • JAX-RS
    • None

    Description

      The following line in JAXRSOutInterceptor.serializeMessage causes a ClassCastException if the headers are not of type MultivaluedMap.

      MultivaluedMap<String, Object> responseHeaders =
      (MultivaluedMap)message.get(Message.PROTOCOL_HEADERS);

      We have an existing CXF out interceptor that we configure on the CXF bus which works with both SOAP and REST calls so when we add the protocol headers we use a standard HashMap. This worked fine in CXF 2.2 but when we tried upgrading to CXF 2.2.2 our REST services started failing. A few lines above that the code retrieves the headers and refers to them as a standard Map interface.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tommy.odom Tommy Odom
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: