jaxb
  1. jaxb
  2. JAXB-861

Metro doesn't process XmlElementDecl.substitutionHeadNamespace() ##default as package namespace

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.4
    • Fix Version/s: None
    • Component/s: runtime
    • Labels:
      None
    • Environment:

      Windows 7

      Description

      Given an ObjectFactory method of the form:

      @XmlElementDecl(name = "hat", substitutionHeadName = "product")
      public JAXBElement<Hat> createHat(Hat value)

      { return new JAXBElement<Hat>(_Hat_QNAME, Hat.class, null, value); }

      I get an exception of the form:

      com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
      No element mapping exists for "##default":"product"
      this problem is related to the following location:
      at @javax.xml.bind.annotation.XmlElementDecl(scope=class javax.xml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=product, defaultValue=

      The substitutionHeadNamespace should default to the package namespace in this case.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Martin Grebac
            Reporter:
            pwfullbright
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: