2 Replies Latest reply on Apr 16, 2013 4:33 AM by Gary Brown

    JAXB marshalling change between 0.7 and 0.8

    Gary Brown Master

      Hi

       

      For background, this topic relates to a savara discussion thread: https://community.jboss.org/message/807515#807515 and a change that occurred in switchyard between 0.7 and 0.8: https://github.com/jboss-switchyard/core/commit/71a30b6c0503c9c9f7625c4c3c46c48871d3b70b

       

      The problem is that the jaxb generator does not include the @XmlRootElement on the xsd type classes, which causes the marshaller to now through an exception complaining about the missing annotation.

       

      I understand that the previous approach caused other problems, but was wondering whether there was a solution that could accommodate both situations? As it will be a pain if after generating the classes from Savara, users are then required to manually edit them to add the missing annotation.

       

      A possible solution could be to catch the initial exception and then try marshalling with the JAXBElement approach?

       

      Thoughts?

       

      Regards

      Gary