jersey
  1. jersey
  2. JERSEY-18

Support a return type that is a collection of JAXB element objects

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Component/s: core
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      18

      Description

      Jersey does not support the serialization of a return type that is Collection<T>
      where T is a JAXB element. This means that developers have to create their own
      JAXB collection class for each JAXB entry class or write something more generic
      themselves.

      See the following thread for more details:

      https://jersey.dev.java.net/servlets/BrowseList?list=users&by=thread&from=943203

        Activity

        Hide
        frosenberg added a comment -

        Created an attachment (id=6)
        Contains a very basic version of the JAXBCollection and all necessary files to serialize a Collection<T> return type.

        Show
        frosenberg added a comment - Created an attachment (id=6) Contains a very basic version of the JAXBCollection and all necessary files to serialize a Collection<T> return type.
        Hide
        sandoz added a comment -

        A return type can be Collection<T> or something that is assignable to
        Collection<T> where T is a JAXB root element or type bean. An instance of such a
        type is serialized using JAXB where the root element information item is derived
        from the class name of the JAXB bean, using pluralization (which only makes
        sense for English words).

        A method parameter of Collection<T> or List<T> is also supported. The root
        element information item is discarded.

        Show
        sandoz added a comment - A return type can be Collection<T> or something that is assignable to Collection<T> where T is a JAXB root element or type bean. An instance of such a type is serialized using JAXB where the root element information item is derived from the class name of the JAXB bean, using pluralization (which only makes sense for English words). A method parameter of Collection<T> or List<T> is also supported. The root element information item is discarded.

          People

          • Assignee:
            jersey-issues
            Reporter:
            sandoz
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: