0 Replies Latest reply on May 16, 2013 3:20 AM by 1007201

    xmJDK7 - compliancy with JAXB spec 2.2

      It's really a small doubt:
      in JAXB spec 2.2, it says: ”The mapping of existing Java interfaces to schema constructs is not supported. Since an existing class can implement multiple interfaces, there is no obvious mapping of existing interfaces to XML schema constructs.”

      But with JDK 7, it allows the binding of XML elements to a generic list of interface.
      public interface MyInterface {
      Properties getAnothernameproperties();
      void setAnothernameproperties(Properties anothernameproperties);

      public class Root {
      @XmlElements(value = {
      @XmlElement(name = "myObject", type = MyObject.class),
      @XmlElement(name = "otherObject", type = MyOtherObject.class) })
      protected List<MyInterface> myList = new ArrayList<MyInterface>();

      Is the JDK7 implementation spec compliant or not?

      Edited by: 1004198 on May 15, 2013 8:19 PM