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

XmlAttachmentRef annotation on List<DataHandler> is not identified as an Attachment part

    XMLWordPrintable

Details

    Description

      Consider a complex type

      <complexType name="ArrayOfSwaRef">
      <sequence>
      <element maxOccurs="unbounded" minOccurs="0" name="swaRef" nillable="true" type="wsi:swaRef"/>
      </sequence>
      </complexType>

      Using wsconsume the type is mapped to the class:

      @XmlAccessorType(XmlAccessType.FIELD)
      @XmlType(name = "ArrayOfSwaRef", propOrder = {
      "swaRef"
      })
      public class ArrayOfSwaRef {

      @XmlAttachmentRef
      protected List<DataHandler> swaRef;
      ....
      }

      Although if such a construct is allowed is debatable as API http://java.sun.com/javase/6/docs/api/javax/xml/bind/annotation/XmlAttachmentRef.html says that the filed/property must always map to a DataHandler class, jbossws-native misses to scan such parameter types properly and eventually the Content-Type is never set to multipart/related on the wire.

      Attachments

        Issue Links

          Activity

            People

              mageshbk_jira Magesh Bojan (Inactive)
              mageshbk_jira Magesh Bojan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: