Here's my dilemma: the svcutil command still generates the Order Named parameter for complex content that is marked as xsd: all.
Here is my sample diagram.
<xsd:complexType name="SpecialReportEntityRow" >
<xsd:complexContent>
<xsd:extension base="list:BaseRowExt">
<xsd:all>
<xsd:element name="customerName" type="xsd:string" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="Id" type="xsd:long" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="certificateType" type="xsd:string" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="certificateValidity" type="xsd:long" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="item" type="xsd:long" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="description" type="xsd:string" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="quantity" type="xsd:long" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="startDate" type="xsd:dateTime" form="unqualified" minOccurs="0" maxOccurs="1" />
<xsd:element name="endDate" type="xsd:dateTime" form="unqualified" minOccurs="0" maxOccurs="1" />
</xsd:all>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
For the above diagram, Here is a numbered generated fragment. See that it generates the Named Order Parameter in the Attribute. Despite the fact that the schema contains xsd: all content.
, , , , xsd: xsd: sequence. , , SpecialReportEntityRow , . . CertificateType , CertificateValidaty - 1, . .
-, XmlElementAttribute Order , SpecialReportEntityRow .
- , , xsd: svcutil.
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=0)]
public string customerName
{
get
{
return this.customerNameField;
}
set
{
this.customerNameField = value;
}
}
[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)]
public long orgId
{
get
{
return this.orgIdField;
}
set
{
this.orgIdField = value;
}
}
XML:
<ns5:rows xsi:type="ns7:SpecialReportEntityRow">
<certificateType>Dummy Type 1</certificateType>
<certificateValidity>2</certificateValidity>
<customerName>Customer1</customerName>
<description>Revocations by Reason - Unused</description>
<item>17</item>
</ns5:rows>
<ns5:rows xsi:type="ns7:SpecialReportEntityRow">
<certificateType>Dummy Type 2</certificateType>
<certificateValidity>2</certificateValidity>
<customerName>Custome1</customerName>
<description>Revocations by Reason- Ca Compromise</description>
<item>19</item>
</ns5:rows>