8 Replies Latest reply on Jun 29, 2011 3:42 PM by tfennelly

    JAXB annotations for easy web service use

    jpechanec

      Hi,

       

      I was thinking about the way how can be imlpemented an easy to start with way to work with web services. Currently you need to write either Java transformer or Smooks-based one. To be honest it is not the easiest way for a newcomer.

       

      How about having a JavaBean that is annotated with JAXB annotations? It is very easy to use for simpler cases. During the buld process there will be a plug-in that will scan for @XmlRootElement annotation on Java classes. If founf then two transormers would be registered based on classname and associated namespace and element name.

       

      The transformer implementation can be done in one of two ways

      • using plain JAXB API
      • a Smooks-config file will be generated to handle XML-to-Java binding and template generation

       

      Or would it be better to not to do it duirng the build but add it as a feature to Forge?

       

      What's your opinion?