Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-224

XStreamMarshaller is missing the call to omit fields from serialization process

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.4
    • Component/s: OXM
    • Labels:
      None

      Description

      XStreamMarshaller is missing the ability to omit fields from been serialized / deserialized even though underling xstream library has it..

      We currently are working around the issue by using reflection. It is though rather a hack.

      I propose to add method addOmitField(My.class, "field name") or something along those lines

        Activity

        Hide
        tareq Tareq Abedrabbo added a comment -

        Patch + unit tests.
        Added:

        • a simple addOmittedField method
        • setOmittedFieldsMap taking a map of classes mapped to arrays of String field names
        • setOmittedFields taking a map of classes mapped to comma separated field names as setOmittedFieldsMap might be too verbose in XML configuration files.
          setOmittedFieldsMap and setOmittedFields are quite similar and maybe keeping only one of them is enough.
        Show
        tareq Tareq Abedrabbo added a comment - Patch + unit tests. Added: a simple addOmittedField method setOmittedFieldsMap taking a map of classes mapped to arrays of String field names setOmittedFields taking a map of classes mapped to comma separated field names as setOmittedFieldsMap might be too verbose in XML configuration files. setOmittedFieldsMap and setOmittedFields are quite similar and maybe keeping only one of them is enough.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues

          People

          • Assignee:
            tareq Tareq Abedrabbo
            Reporter:
            c0nst Kostya
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: