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

XStreamMarshaller should be extended to allow specifying annotated classes

    Details

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

      Description

      In at least the latest version of XStream ( 1.2.2 ), there is support for annotating classes to define the aliases. See this page for reference.

      http://xstream.codehaus.org/annotations-tutorial.html

      This is a request to improve the sub classing ability of org.springframework.oxm.xstream.XStreamMarshaller and add support for handling XStream annotated classes in the oxm packages.

      Suggestions for improvement to existing classes

      • make the private XStream instance in XStreamMarshaller available to subclasses ( XStream instance needed by Annotations.configureAliases. (perhaps use case for http://opensource.atlassian.com/projects/spring/browse/SWS-34).
      • add XStreamAnnotationMarshaller.java(name?) in spring-oxm-tiger dist, that adds support for XStream annotated classes. Perhaps method signatures similar to these
        • configureAnnotatedClass(Class<?> topLevelClass)
        • configureAnnotatedClasses(Set<Class<?>> topLevelClasses)
          The above two methods would call
          com.thoughtworks.xstream.annotations.Annotations.configureAliases(XStream xstream, Class<?>... topLevelClasses)
      • add method to existing org.springframework.oxm.xstream.XStreamMarshaller that allows one to specify explicit classes that are 'supported' By default public boolean supports(Class clazz) would behave as it does now ( always returning true) unless one were to specify one or more specific classes that are only to be supported.

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Implemented: the AnnotationXStreamMarshaller.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Implemented: the AnnotationXStreamMarshaller.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing 1.0.2 issues.

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

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            plynch Peter Lynch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: