I am consuming a 3rd-party webservice (of which, I have no control over) in .NET.
I noticed some of my properties were not being set when the response was returning and being serialized from the service.
I have noticed something strange with their response though.
Ths is a sample of their WSDL
<xs:complexType name="letters">
<xs:complexContent>
<xs:extension base="tns:response">
<xs:sequence>
<xs:element name="a" type="xs:long" />
<xs:element minOccurs="0" name="b" type="xs:dateTime" />
<xs:element maxOccurs="unbounded" minOccurs="0" name="c" nillable="true" type="tns:anotherComplexType" />
<xs:element minOccurs="0" name="d" type="xs:dateTime" />
<xs:element minOccurs="0" name="e" type="tns:string" />
<xs:element minOccurs="0" name="f" type="tns:boolean" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
And this is a sample of the relevant part of the response:
<letters>
<a>0</a>
<b>2015-02-03T11:59:18+11:00</b>
<d>2015-02-03T12:00:00+11:00</d>
<f>true</f>
</letters>
I suspect that because they are defining a <xs:sequence> for the elements in the <letters> part, that the .NET Serializer is expecting the response to have ALL elements present in the response? (And thus, their response breaks their WDSL definition?).
Thanks
No comments:
Post a Comment