If I try to validate this xml...
<?xml version="1.0" encoding="utf-8" ?>
<a:FuncalcParameters xmlns:a="http://www.somewhere.fun.com/Funcalc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.somewhere.fun.com/Funcalc
http://localhost/FuncalcService/FuncalcParameters.xsd">
<TransId>D-288</TransId>
<CalcType>CalculateARM</CalcType>
<SR>5</SR>
<RRT></RRT>
<RRQ></RRQ>
<B_Indicator>y</B_Indicator>
<ReferenceYYYYMMDD>1998-05-12</ReferenceYYYYMMDD>
<ARM>lala</ARM>
<SRMP>136.26</SRMP>
<ResponseYYYYMMDD>2003-06-30</ResponseYYYYMMDD>
</a:FuncalcParameters>
....against this schema...
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.somewhere.fun.com/Funcalc"
targetNamespace="http://www.somewhere.fun.com/Funcalc">
<xs:element name="FuncalcParameters" nillable="true"
type="FuncalcParameters" />
<xs:complexType name="FuncalcParameters">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="TransId" type="xs:string"/>
<xs:element minOccurs="1" maxOccurs="1" name="CalcType"
type="CalculationType"/>
<xs:element minOccurs="1" maxOccurs="1" name="SR" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="RRT" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="RRQ" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="B_Indicator"
type="BackType" />
<xs:element minOccurs="0" maxOccurs="1" name="ReferenceYYYYMMDD"
type="xs:date" />
<xs:element minOccurs="1" maxOccurs="1" name="ARM" type="xs:float" />
<xs:element minOccurs="1" maxOccurs="1" name="SRMP" type="xs:float" />
<xs:element minOccurs="0" maxOccurs="1" name="ResponseYYYYMMDD"
type="xs:date" />
</xs:sequence>
</xs:complexType>
<xs:simpleType name="CalculationType">
<xs:restriction base="xs:string">
<xs:enumeration value="CalculateARM" />
<xs:enumeration value="CalculateSRMP" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="BackType">
<xs:restriction base="xs:string">
<xs:enumeration value="b" />
<xs:enumeration value="B" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
....the validation complains that...
Element 'http://www.somewhere.fun.com/Funcalc:FuncalcParameters' has invalid
child element 'TransId'. Expected
'http://www.somewhere.fun.com/Funcalc:TransId
http://www.somewhere.fun.com/Funcalc:CalcType'...
Why does it mention "CalcType"? Altering the schema so that "CalcType" is
further down results in the validation complaining about
'http://www.somewhere.fun.com/Funcalc:TransId
http://www.somewhere.fun.com/Funcalc:SR'. Can anyone see what's going on?
Thanks