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

ClassCastException in JAXBEncoderDecoder.unmarshall()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.1
    • 2.0.2
    • JAXB Databinding
    • None

    Description

      If a WebService has a method with a parameter which is an array of a primitive type it causes a ClassCastException in JAXBEncoderDecoder.unmarshall()

      Example:

      @WebService
      class WS {
      public void aMethod(int[] a)

      { ...; }

      }

      java.lang.ClassCastException: [I
      at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:263)
      at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
      at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:235)
      at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:121)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
      at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
      at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:139)
      at org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)
      at org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249)

      It would be good if CXF could handle this correctly too.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            reboot Christoph Hohmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: