XSD choice element sequence

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rval
    New Member
    • Sep 2007
    • 1

    XSD choice element sequence

    I have this schema while teh following sequence

    <complexType name="SetOfTask s" mixed="true">
    <sequence>
    <choice minOccurs="1" maxOccurs="unbo unded">
    <element minOccurs="0" ref="tns:task1" />
    <element minOccurs="0" ref="tns:task2" />
    <element minOccurs="0" ref="tns:task3" />
    <element minOccurs="0" ref="tns:task4" />
    <element minOccurs="0" ref="tns:task5" />
    <element minOccurs="0" ref="tns:task6" />
    <element minOccurs="0" ref="tns:task7" />
    <element minOccurs="0" ref="tns:load_i nputs" />
    <element minOccurs="0" ref="tns:task8" />
    <element minOccurs="0" ref="tns:task9" />
    </choice>
    </sequence>
    </complexType>

    where the element input is describe in the following way


    <element name="load_inpu ts" type="tns:LoadI nputsType">
    <annotation>
    <documentatio n>
    A parallel loading of 2 or more inputs.
    </documentation>
    </annotation>
    </element>


    <complexType name="LoadInput sType">
    <sequence>
    <element minOccurs="1" maxOccurs="unbo unded" ref="tns:load">
    <annotation>
    <documentatio n>
    Copies input data into specified EBS component.
    </documentation>
    </annotation>
    </element>
    </sequence>


    When i applie the xds.exe genarete the respective serialize class , but when execute the deserialize method the elements load_inputs not are readed or not loaded fo r th respective object




    public class LoadType {

    /// <remarks/>
    [System.Xml.Seri alization.XmlAt tributeAttribut e(DataType="IDR EF")]
    public string inputID;
    }




    /// <remarks/>
    [System.Xml.Seri alization.XmlTy peAttribute(Nam espace="http://www.criticalsof tware.com/TC_schema")]
    public class SetOfTasks {


    ....
    [System.Xml.Seri alization.XmlEl ementAttribute( "exec_sql", typeof(SQLType) )]

    ....

    public object[] Items;

    /// <remarks/>
    [System.Xml.Seri alization.XmlEl ementAttribute( "ItemsElementNa me")]
    [System.Xml.Seri alization.XmlIg noreAttribute()]
    public ItemsChoiceType[] ItemsElementNam e;
    }




    ...


    [System.Xml.Seri alization.XmlEl ementAttribute( "load")]
    public LoadType[] load;




    Can any one help me

    Thanks
Working...