System.Xml.Serialization.SoapElementAttribute Class

Specifies that the public member value be serialized by the System.Xml.Serialization.XmlSerializer as an encoded SOAP XML element.

See Also: SoapElementAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue | System.AttributeTargets.All)]
public class SoapElementAttribute : Attribute

Remarks

The System.Xml.Serialization.SoapElementAttribute 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.

Apply the System.Xml.Serialization.SoapElementAttribute to a public field to direct the System.Xml.Serialization.XmlSerializer to serialize the field as an encoded SOAP XML element.

For more information about using attributes, see [<topic://cpconExtendingMetadataUsingAttributes>].

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0