-
Notifications
You must be signed in to change notification settings - Fork 200
Open
Description
Problem
Using the following code:
var serializer = new XmlSerializer(typeof(MESSAGE));
var reader = XmlReader.Create(stream, new XmlReaderSettings { Async = true });
var deserialized = await Task.Run(() => serializer.Deserialize(reader) as MESSAGE, cancellationToken);
I get the following exception:
System.InvalidOperationException : There was an error reflecting type 'SomeNamespace.MESSAGE'.
----> System.InvalidOperationException : There was an error reflecting property 'DEAL_SETS'.
----> System.InvalidOperationException : There was an error reflecting type 'SomeNamespace.DEAL_SETS'.
----> System.InvalidOperationException : There was an error reflecting property 'DEAL_SET'.
----> System.InvalidOperationException : There was an error reflecting type 'SomeNamespace.DEAL_SET'.
----> System.InvalidOperationException : There was an error reflecting property 'DEALS'.
----> System.InvalidOperationException : There was an error reflecting type 'SomeNamespace.DEALS'.
----> System.InvalidOperationException : There was an error reflecting property 'DEAL'.
----> System.InvalidOperationException : There was an error reflecting type 'SomeNamespace.DEAL'.
----> System.InvalidOperationException : There was an error reflecting property 'RELATIONSHIPS'.
----> System.InvalidOperationException : There was an error reflecting type 'SomeNamespace.RELATIONSHIPS'.
----> System.InvalidOperationException : There was an error reflecting property 'RELATIONSHIP'.
----> System.InvalidOperationException : There was an error reflecting type 'SomeNamespace.RELATIONSHIP'.
----> System.InvalidOperationException : There was an error reflecting property 'type'.
----> System.InvalidOperationException : The global XML attribute 'type' from namespace 'http://www.w3.org/1999/xlink' references distinct types SomeNamespace.MISMOresourceLink and SomeNamespace.MISMOarcLink. Use XML attributes to specify another XML name or namespace for the attribute or types.
I tried with and without using the -t-
option but the error is the same.
Steps to reproduce
- Download schemas from this location (zip file) or use this file: appendix_e_mismo_reference_model_and_uldd_extension_schema.zip
- Generate using the following command:
XmlSchemaClassGenerator.Console --namespace=SomeNamespace --separateFiles --output=../Generated --namingScheme=Direct -t- ULDD_Phase_4a_Extension.xsd
- Try to deserialize the first file from this location (zip file) or use this file: appendix_c_freddie_mac_xml_samples.zip
Metadata
Metadata
Assignees
Labels
No labels