Allows the System.Xml.Serialization.XmlSerializer to recognize a type when it serializes or deserializes an object as encoded SOAP XML.
See Also: SoapIncludeAttribute Members
The System.Xml.Serialization.SoapIncludeAttribute class belongs to a family of attributes that controls how the System.Xml.Serialization.XmlSerializer serializes, or deserializes, an object as encoded SOAP XML. The resulting XML conforms to section 5 of the World Wide Web Consortium (www.w3.org) document, "Simple Object Access Protocol (SOAP) 1.1". For a complete list of similar attributes, see [<topic://cpconAttributesThatControlSOAPEncodedSerialization>].
To serialize an object as an encoded SOAP message, you must construct the System.Xml.Serialization.XmlSerializer using an System.Xml.Serialization.XmlTypeMapping created with the SoapReflectionImporter.ImportTypeMapping(Type) method of the System.Xml.Serialization.SoapReflectionImporter class.
When applying the System.Xml.Serialization.SoapIncludeAttribute, specify the Type of the derived class. When the System.Xml.Serialization.XmlSerializer serializes objects that include both the base and the derived classes, it can then recognize both object types.
You can use the System.Xml.Serialization.SoapIncludeAttribute to include derived classes in service description documents that are written in the Web Services Description Language (WSDL). For example, if a method returns an object, apply the System.Xml.Serialization.SoapIncludeAttribute to the method and specify the actual types that should be returned.
For more information about WSDL, see World Wide Web Consortium (www.w3.org) specification, "Web Services Description Language (WSDL) 1.1".
For more information about using attributes, see [<topic://cpconExtendingMetadataUsingAttributes>].