I've been using the SourceGenerator for many large XSD schemas and it has been extremely helpful given that i'm almost non-conversant in XML Schema definition.  The java objects however, have been just great.
 
My quesiton, however is this.  I can't change the element name in the schema, but need to override the field descriptor (out put tag name) for that element.
Below:
          <xsd:element name="OutGroupIncdMsgIdsRow" minOccurs ="0" maxOccurs="5">
I would like to insure that the tag that is generated when marshalling is "row". 
Currently i am actually editing the generated field descriptor class for OutGroupIncdMsgIdsDescriptor to insure that "row" is used.  However, that means i have to re-edit every time i generate the classes, which does happen because these schemas are redistributed to me with minor changes.  I would like to maintain changes to the schema, but not have to change the generated java.
 
So, is there anything i can place in the schema below to insure that "row" is used as a descriptor for element named:OutGroupIncdMsgIdsRow
?
 
       <xsd:element name="OutGroupIncdMsgIds">
        <xsd:complexType>
         <xsd:sequence>
          <xsd:element name="OutGroupIncdMsgIdsRow" minOccurs ="0" maxOccurs="5">
           <xsd:complexType>
            <xsd:sequence>
             <xsd:element name="OutGrpIncdMsgIdsCommonDesign">
              <xsd:complexType>
               <xsd:sequence>
 
                <xsd:element name="MessageId">
                 <xsd:simpleType>
                  <xsd:restriction base="xsd:string">
                   <xsd:maxLength value="8"/>
                  </xsd:restriction>
                 </xsd:simpleType>
                </xsd:element>
 
               </xsd:sequence>
              </xsd:complexType>
             </xsd:element>
            </xsd:sequence>
           </xsd:complexType>
          </xsd:element>
         </xsd:sequence>
        </xsd:complexType>
       </xsd:element>

Reply via email to