[jbossws-issues] [JBoss JIRA] Updated: (JBWS-2751) Support all JAXB annotations in JAXBIntroductions

Stefan Fussenegger (JIRA) jira-events at lists.jboss.org
Thu Dec 3 09:58:29 EST 2009


     [ https://jira.jboss.org/jira/browse/JBWS-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Fussenegger updated JBWS-2751:
-------------------------------------

    Attachment: XmlValue.patch


Hi Alessio, thanks for effort. As far as I've seen you haven't changed anything but formatting, organization and mavenization (i.e. the code is pretty much the same as what I wrote). I already have this code in production for quite a while and it works very well. Today, I've switched to the 1.0.2-SNAPSHOT version and everything kept working as before (as expected, as nothing changed really).

Regarding other annotations, I don't need any at the moment. However, it would certainly be beneficial to have full JAXB annotation support. I'm currently not sure how much is missing, but adding a single annotation isn't very difficult. To demonstrate how easy it is, I've added the attached patch for @XmlValue support (yet untested).

Finally, simply call the binding compiler:

rm -f src/main/java/org/jboss/jaxb/intros/configmodel/*.java
xjc -b jaxb-bindings.xjb -d src/main/java/ src/main/resources/jaxb-intros.xsd

(I'd suspect that the last step is best done as part of a maven build. I'll look at it ant try to come up with another patch for the POM)

> Support all JAXB annotations in JAXBIntroductions
> -------------------------------------------------
>
>                 Key: JBWS-2751
>                 URL: https://jira.jboss.org/jira/browse/JBWS-2751
>             Project: JBoss Web Services
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-native
>            Reporter: Stefan Fussenegger
>            Assignee: Alessio Soldano
>             Fix For:  jbossws-cxf-3.2.2,  jbossws-native-3.2.2
>
>         Attachments: JAXBIntroductions-rewrite.zip, XmlValue.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbossws-issues mailing list