System.Web.Services 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Xml.Serialization.XmlType(IncludeInSchema=false) System.Xml.Serialization.SoapType(IncludeInSchema=false)

SOAP headers offer a method for passing data to and from an XML Web service method if the data is not directly related to the XML Web service method's primary functionality. For instance, an XML Web service might contain several XML Web service methods that each require a custom authentication scheme. Instead of adding parameters to each XML Web service method for the custom authentication scheme, a , referring to a class deriving from , can be applied to each XML Web service method. The implementation for the class deriving from handles the custom authentication scheme. In this manner, the XML Web service method implements only the functionality specific to it and adds additional functionality using a SOAP header.

The following list outlines the basic steps to receiving and processing a SOAP header:

Create a class that derives from representing the data passed into the SOAP header.

Add a member to the class implementing an XML Web service or an XML Web service client proxy class, of the type created in the first step.

Apply a to the XML Web service method or the corresponding method in the proxy class, specifying the member created in the second step in the property.

Within the XML Web service method or XML Web service client code, access the property to process the data sent in the SOAP header.

When overridden in a derived class, represents the content of a SOAP header.

- Constructor
  To be added

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Property
  System.String To be added: an object of type 'string'

  To set the recipient of a SOAP header, set the property. Regardless of the version of the SOAP protocol used to communicate with an XML Web service, the .NET Framework automatically generates the SOAP message specific to the version of the SOAP protocol. Specifically, the XML element and XML namespace representing the recipient differ for the two versions.

  XML Web services receiving the SOAP header can get the intended recipient by getting either the or properties.

  The recipient(s) for the Body element and each of the SOAP headers within the Header element of a SOAP message need not be the same. If a Header element exists in the SOAP message, it represents additional data that can be sent to and from the XML Web service method or an intermediary. The recipient of that data, known as the SOAP Actor in version 1.1, can be a different URI than the URI for the XML Web service method.

  For more information on the SOAP actor attribute, see the SOAP specification at http://www.w3.org/TR/SOAP/.

  Gets or sets the recipient of the SOAP header.

  1.0.5000.0
  2.0.0.0
  System.Xml.Serialization.XmlAttribute("actor", Namespace="http://schemas.xmlsoap.org/soap/envelope/")
  System.Xml.Serialization.SoapAttribute("actor", Namespace="http://schemas.xmlsoap.org/soap/envelope/")
  System.ComponentModel.DefaultValue("")
- Property
  System.Boolean To be added: an object of type 'bool'

  For SOAP headers defined by an XML Web service, ASP.NET assumes the XML Web service method properly processed the SOAP header by setting the initial value of to true. For SOAP headers not defined by the XML Web service, the initial value is false. If ASP.NET detects SOAP headers passed to an XML Web service method with set to false after the method returns, a is thrown back to the XML Web service client instead of the results from the XML Web service method.

  Gets or sets a value indicating whether an XML Web service method properly processed a SOAP header.

  1.0.5000.0
  2.0.0.0
  System.Xml.Serialization.XmlIgnore
  System.Xml.Serialization.SoapIgnore
- Property
  System.String To be added: an object of type 'string'

  Do not use this property. Instead use the property.

  Gets or sets the value of the mustUnderstand XML attribute for the SOAP header when communicating with SOAP protocol version 1.1.

  1.0.5000.0
  2.0.0.0
  System.Xml.Serialization.XmlAttribute("mustUnderstand", Namespace="http://schemas.xmlsoap.org/soap/envelope/")
  System.Xml.Serialization.SoapAttribute("mustUnderstand", Namespace="http://schemas.xmlsoap.org/soap/envelope/")
  System.ComponentModel.DefaultValue("0")
- Property
  2.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Xml.Serialization.XmlAttribute("mustUnderstand", Namespace="http://www.w3.org/2003/05/soap-envelope")
  System.Xml.Serialization.SoapAttribute("mustUnderstand", Namespace="http://www.w3.org/2003/05/soap-envelope")
  System.ComponentModel.DefaultValue("0")
  System.String To be added.

  Do not use this property. Instead use the property.

  Gets or sets the value of the mustUnderstand XML attribute for the SOAP header when communicating with SOAP protocol version 1.2.

- Property
  2.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Xml.Serialization.XmlAttribute("relay", Namespace="http://www.w3.org/2003/05/soap-envelope")
  System.Xml.Serialization.SoapAttribute("relay", Namespace="http://www.w3.org/2003/05/soap-envelope")
  System.ComponentModel.DefaultValue("0")
  System.String To be added.

  The property applies only to SOAP 1.2 and indicates whether the recipient of the message forwards this header when it forwards the message to the next node downstream. Because the .NET Framework does not support SOAP intermediaries, this property is serialized and deserialized but ignored.

  Gets or sets the relay attribute of the SOAP 1.2 header.

- Property
  System.Boolean To be added: an object of type 'bool'

  When an XML Web service client adds a SOAP header to an XML Web service method call with the property set to true, the XML Web service method must set the property to true; otherwise, a is thrown back to the XML Web service client by ASP.NET.

  Although both the and properties can be used to set the value of the mustUnderstand attribute within the SOAP header, the property allows you to set the attribute using a Boolean value.

  For details on adding SOAP headers to clients, see [<topic://cpconusingsoapheaders>].

  Gets or sets a value indicating whether the must be understood.

  1.0.5000.0
  2.0.0.0
  System.Xml.Serialization.XmlIgnore
  System.Xml.Serialization.SoapIgnore
- Property
  2.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Xml.Serialization.XmlIgnore
  System.Xml.Serialization.SoapIgnore
  System.Boolean To be added.

  The default SOAP 1.2 processing rules require SOAP nodes to remove headers that are not understood by the SOAP processing node before passing the message on to the next node.

  Gets or sets a value that indicates whether the SOAP header is to be relayed to the next SOAP node if the current node does not understand the header.

- Property
  2.0.0.0
  System.Runtime.InteropServices.ComVisible(false)
  System.Xml.Serialization.XmlAttribute("role", Namespace="http://www.w3.org/2003/05/soap-envelope")
  System.Xml.Serialization.SoapAttribute("role", Namespace="http://www.w3.org/2003/05/soap-envelope")
  System.ComponentModel.DefaultValue("")
  System.String To be added.

  To set the recipient of a SOAP header, set the property. Regardless of the version of the SOAP protocol used to communicate with an XML Web service, the .NET Framework automatically generates the SOAP message specific to the version of the SOAP protocol. Specifically, the XML element and XML namespace representing the recipient differ for the two versions.

  XML Web services receiving the SOAP header can get the intended recipient by getting either the or properties.

  The recipient(s) for the Body element and each of the SOAP headers within the Header element of a SOAP message need not be the same. If a Header element exists in the SOAP message, it represents additional data that can be sent to and from the XML Web service method or an intermediary. The recipient of that data, known as the SOAP Role in version 1.2 of the SOAP specification and the SOAP Actor in version 1.1, can be a different URI than the URI for the XML Web service method.

  For more information on the SOAP actor attribute, see the SOAP specification at http://www.w3.org/TR/SOAP/.

  Gets or sets the recipient of the SOAP header.