Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This topic is specific to a legacy technology. XML Web services and XML Web service clients should now be created using Windows Communication Foundation.
The .NET Framework does not provide binding support for the <union> element.
When Xsd.exe encounters a simple type defined by union, it ignores the <simpleType> definition and uses the built-in string data type in its place.
The XML Schema definition language allows a simple type to be defined as a union of one or more simple types, or member types. An instance of the type may validly conform to any one of the member types.
When the Xsd.exe utility encounters a simple type defined by union, it ignores the <simpleType> definition and uses the built-in string data type in its place. Accordingly, when deserializing an XML document into a type generated by Xsd.exe, the XmlSerializer class disregards an Xsi:type Attribute Binding Support attribute intended to instantiate a union, deserializing instead a string.
Possible Attributes | Binding Support |
---|---|
id |
The Xsd.exe utility ignores the id attribute, which is intended to provide a unique identifier. |
memberTypes |
Xsd.exe ignores the memberTypes value along with the rest of the containing <union> element. Instead, the tool produces a string in place of the simple type definition. |
Possible parent elements: <simpleType>
Possible child elements: <annotation>, <simpleType>