Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-308

Cannot handle arrays of primitives

XMLWordPrintable

      $ ant -Dtest=org.jboss.test.webservice.marshalltest.MarshallDocLiteralTestCase

      Caused by: java.lang.ClassCastException: [I
      at org.jboss.xml.binding.XercesXsMarshaller.marshalElement(XercesXsMarshaller.java:299)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalParticle(XercesXsMarshaller.java:469)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalModelGroupSequence(XercesXsMarshaller.java:583)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalModelGroup(XercesXsMarshaller.java:538)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalParticle(XercesXsMarshaller.java:462)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalComplexType(XercesXsMarshaller.java:449)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalElementType(XercesXsMarshaller.java:354)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalElement(XercesXsMarshaller.java:327)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalParticle(XercesXsMarshaller.java:469)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalModelGroupSequence(XercesXsMarshaller.java:583)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalModelGroup(XercesXsMarshaller.java:538)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalParticle(XercesXsMarshaller.java:462)
      at org.jboss.xml.binding.XercesXsMarshaller.marshalComplexType(XercesXsMarshaller.java:449)
      at org.jboss.xml.binding.XercesXsMarshaller.marshallInternal(XercesXsMarshaller.java:176)
      at org.jboss.xml.binding.XercesXsMarshaller.marshal(XercesXsMarshaller.java:141)
      at org.jboss.ws.jaxb.JAXBMarshallerImpl.marshal(JAXBMarshallerImpl.java:89)

      In the beginning the WS layer had the same issue. It consequnetly converts primitves to their corresponding wrapper types and visa versa on entry and exit. Internally it only deals with wrapper types. See the usage of org.jboss.util.JavaUtils

              olubyans@redhat.com Alexey Loubyansky
              tdiesler@redhat.com Thomas Diesler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: