I'm trying to deserialize a message from a schema which define request and response messages (CustomerLookup and CustomerLookupResponse both defined in the same schema as CustomerLookupServiceType)
I have generate cs files from xsd using the xsd tool straight forward without making changes. It seems that it's not good enough. While the serialization of the request passes, the deserialization of the response doesn't work. XMl are compliant to schema according to XMLSpy.
public void DeserializeAndValidateResponse()
string fileName = @"Data\CustomerLookup\CustomerLookupResponseSample1.xml";
var response = XmlGenericSerializer.Deserialize<CustomerLookupServiceType>(fileName);
string officialName = response.CustomerBody.PersonalIdentification.Name.OfficialName;
bool result = XML_XSD_Validator.Validate(fileName, @"Data\CustomerLookup\CustomerLookupV3.0.0.xsd");