Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-615

JAX-RS Demarshalling does not handle subclasses

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.3.1.Final
    • Fix Version/s: 2.4.0.Final
    • Component/s: ErraiJAXRS
    • Labels:
      None

      Description

      If my JAX-RS class signature is:

      public BaseClass getObject()

      { return new SubClass(); }

      The generated JSON code will correctly send out "SubClass".

      However, the client stub is generated statically, and will demarshall as "BaseClass".

      Changing the return type to Object goes through the generic Object demarshaller, that does return the correct subclass.

      This can be worked around with a custom marshaller (even one that simply delegates to the Object.class demarshaller), but it would be better if the framework supported this functionality out of the box.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                csa Christian Sadilek
                Reporter:
                jsightler Jesse Sightler
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: