jaxb
  1. jaxb
  2. JAXB-911

JAXB unable to produce correct xml annotation about optional/mandatory fields if parent structure is optional

    Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.5
    • Fix Version/s: None
    • Component/s: xjc
    • Labels:
      None
    • Environment:

      windows 7, jdk 1.6

      Description

      in xsd file content like :(sample xsd file is attached. in XCss.java generated by XJC we dont get xml annotation about required information of field.ie @xmlElement(required="true") is ignored.

      <xsd:complexType name="XCss" >
      <xsd:sequence minOccurs="0">---------------->>>>>>>>>>-if minOccurs is removed then xml annotation with required info is generated (for mandatory required ="true") else @xmlElement for xml annotation is ignored .
      <xsd:element name="name" type="axlapi:UniqueName50" nillable="false"/>
      <xsd:element name="description" type="axlapi:String50" nillable="false" minOccurs="0"/>
      <xsd:element name="members" minOccurs="0">
      <xsd:complexType>
      <xsd:complexContent>
      <xsd:extension base="axlapi:XCommonMembersExtension">
      <xsd:sequence minOccurs="0">
      <xsd:element name="member" type="axlapi:XCallingSearchSpaceMember" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      </xsd:extension>
      </xsd:complexContent>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="partitionUsage" type="axlapi:XPartitionUsage" default="General" nillable="false" minOccurs="0"/>
      </xsd:sequence>
      </xsd:complexType>

      1. axl.xsd
        4 kB
        rajatkumarraghuvanshi2

        Activity

        Hide
        rajatkumarraghuvanshi2 added a comment -

        hi ,
        Please can any one proceed/resolve this defect. I need help.

        Show
        rajatkumarraghuvanshi2 added a comment - hi , Please can any one proceed/resolve this defect. I need help.

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            rajatkumarraghuvanshi2
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 10 weeks
              10w
              Remaining:
              Remaining Estimate - 10 weeks
              10w
              Logged:
              Time Spent - Not Specified
              Not Specified