S
sudheer.kilari
<xsd:complexType name="BaseMoney">
<xsd:sequence>
<xsd:element name="amount" type="xsd:decimal"
minOccurs="0"/>
<xsd:element name="currencyCode"
type="tns:CurrencyTypeCode" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MiscSaleInfo">
<xsd:sequence>
<xsd:element name="amount"
type="tns:BaseMoney" minOccurs="0"/>
<xsd:element name="chargeType"
type="tns:MiscSaleChargeTypeCode" minOccurs="0"/>
</xsd:sequence>
In the above schema, I am creating a element "amount" which is of
type "BaseMoney".But BaseMoney again has a elment named amount in it.
I attached a simple Example, but is it a good practice ? ( I am able
to validate both the Schema and message )
Example:
- <miscSales>
- <amount>
<amount>345.36</amount>
<currencyCode>USD</currencyCode>
</amount>
<xsd:sequence>
<xsd:element name="amount" type="xsd:decimal"
minOccurs="0"/>
<xsd:element name="currencyCode"
type="tns:CurrencyTypeCode" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MiscSaleInfo">
<xsd:sequence>
<xsd:element name="amount"
type="tns:BaseMoney" minOccurs="0"/>
<xsd:element name="chargeType"
type="tns:MiscSaleChargeTypeCode" minOccurs="0"/>
</xsd:sequence>
In the above schema, I am creating a element "amount" which is of
type "BaseMoney".But BaseMoney again has a elment named amount in it.
I attached a simple Example, but is it a good practice ? ( I am able
to validate both the Schema and message )
Example:
- <miscSales>
- <amount>
<amount>345.36</amount>
<currencyCode>USD</currencyCode>
</amount>