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

JAXBIntroductions: support @XmlTransient, @XmlID, @XmlIDREF, @XmlElementWrapper and @XmlJavaTypeAdapter

    XMLWordPrintable

Details

    Description

      JAXBIntroductions (http://www.jboss.org/community/wiki/JAXBIntroductions) is a nice library but not used very much - most likely as it only supports a minor subset of JAXB annotations. For my special use case, JAXBIntroductions proved to be extremely useful, that's why I'd love to see support for all annotations.

      I've just sent a rewrite of the library to Tom Fennelly, who forwarded it to Alessio Soldano, who suggested to add this feature request. Here's my orginal mail:

      ---------
      Hi Tom,

      I'm writing to you as the maintainer of JAXBIntroductions. This little library was promising to be of great help for my usecase - and it was.

      However, support for JAXB annotations was very limited, hence I added some more annotations (namely @XmlTransient, @XmlID, @XmlIDREF, @XmlElementWrapper and @XmlJavaTypeAdapter).

      As adding each annotations included the same code duplication steps, I've decided to do a little rewrite, that now makes adding support for additional annotations a lot easier - each new annotation includes 3 steps:

      1. add annotation to xml schema (jaxb-intros.xsd)
      2. add annotation to jaxb binding (jaxb-bindings.xjb)
      3. add annotation.class to the set of supported annotations (IntroductionsAnnotationReader.java)

      so there's no need to write a handler or code that selects what handler to use.

      I've attached all my code for you to have a look at. I'd be really happy if this code would be included in your nice little lib. As further steps, I'd really love to see support for all JAXB annotations and a release in a maven repository (maybe even central?). I hope you agree with this plans - if yes, I'd certainly help to get this done.

      Please let me know what you think.

      Cheers, Stefan
      ---------

      In other words, all that's left is writing the full schema (and JAXB bindings) to make this library extremely useful for some (not that?) special use cases. I'm neither a JAXB nor a XML Schema ninja myself, but I'd still be willing to get this feature request working.

      I'll attach the full code to this feature request, as a patch could become quite big (and probably hard to sort out). However, if a patch is required, please let me know.

      Attachments

        1. JAXBIntroductions-rewrite.zip
          60 kB
        2. pom.patch
          68 kB
        3. XmlValue.patch
          2 kB
        4. XmlValue.patch
          2 kB

        Issue Links

          Activity

            People

              rhn-support-asoldano Alessio Soldano
              sfussenegger Stefan Fussenegger (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: