SoapHeaderBinding Class
Represents an extensibility element added to an InputBinding or an OutputBinding within an XML Web service.
Assembly: System.Web.Services (in System.Web.Services.dll)
System.Web.Services.Description.ServiceDescriptionFormatExtension
System.Web.Services.Description.SoapHeaderBinding
System.Web.Services.Description.Soap12HeaderBinding
| Name | Description | |
|---|---|---|
![]() | SoapHeaderBinding() | Initializes a new instance of the SoapHeaderBinding class. |
| Name | Description | |
|---|---|---|
![]() | Encoding | Gets or sets a URI representing the encoding style used to encode the SOAP header. |
![]() | Fault | Gets or sets the extension type controlling the output in a WSDL document for the headerfault XML element of a SOAP header. |
![]() | Handled | Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is used by the import process when the extensibility element is imported.(Inherited from ServiceDescriptionFormatExtension.) |
![]() | MapToProperty | Gets or sets a value indicating whether the SoapHeaderBinding instance is mapped to a specific property in generated proxy classes. |
![]() | Message | Gets or sets a value specifying the name of the Message within the XML Web service to which the SoapHeaderBinding applies. |
![]() | Namespace | Get or sets the URI representing the location of the specification for encoding of content not specifically defined by the Encoding property. |
![]() | Parent | Gets the parent of the ServiceDescriptionFormatExtension.(Inherited from ServiceDescriptionFormatExtension.) |
![]() | Part | Gets or sets a value indicating to which MessagePart within the XML Web service the SoapHeaderBinding applies. |
![]() | Required | Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is necessary for the action to which it refers.(Inherited from ServiceDescriptionFormatExtension.) |
![]() | Use | Specifies whether the header is encoded using rules specified by the Encoding property, or is encapsulated within a concrete XML schema. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
For more information about specifying protocols for XML Web services, see [<topic://cpconbuildingaspnetwebservices>]. For more information about Web Services Description Language (WSDL), see the specification at http://www.w3.org/TR/wsdl/.
Imports System Imports System.Web.Services.Description Imports System.Collections Imports System.Xml Public Class MySampleClass Public Shared Sub Main() Dim myServiceDescription As ServiceDescription = _ ServiceDescription.Read("SoapHeaderBindingInput_vb.wsdl") Dim myBinding As New Binding() myBinding.Name = "MyWebServiceSoap" myBinding.Type = New XmlQualifiedName("s0:MyWebServiceSoap") Dim mySoapBinding As New SoapBinding() mySoapBinding.Transport = "http://schemas.xmlsoap.org/soap/http" mySoapBinding.Style = SoapBindingStyle.Document myBinding.Extensions.Add(mySoapBinding) Dim myOperationBinding As New OperationBinding() myOperationBinding.Name = "Hello" Dim mySoapOperationBinding As New SoapOperationBinding() mySoapOperationBinding.SoapAction = "http://tempuri.org/Hello" mySoapOperationBinding.Style = SoapBindingStyle.Document myOperationBinding.Extensions.Add(mySoapOperationBinding) ' Create InputBinding for operation for the 'SOAP' protocol. Dim myInputBinding As New InputBinding() Dim mySoapBodyBinding As New SoapBodyBinding() mySoapBodyBinding.Use = SoapBindingUse.Literal myInputBinding.Extensions.Add(mySoapBodyBinding) Dim mySoapHeaderBinding As New SoapHeaderBinding() mySoapHeaderBinding.Message = New XmlQualifiedName("s0:HelloMyHeader") mySoapHeaderBinding.Part = "MyHeader" mySoapHeaderBinding.Use = SoapBindingUse.Literal ' Add mySoapHeaderBinding to 'myInputBinding' object. myInputBinding.Extensions.Add(mySoapHeaderBinding) ' Create OutputBinding for operation for the 'SOAP' protocol. Dim myOutputBinding As New OutputBinding() myOutputBinding.Extensions.Add(mySoapBodyBinding) ' Add 'InputBinding' and 'OutputBinding' to 'OperationBinding'. myOperationBinding.Input = myInputBinding myOperationBinding.Output = myOutputBinding myBinding.Operations.Add(myOperationBinding) myServiceDescription.Bindings.Add(myBinding) myServiceDescription.Write("SoapHeaderBindingOut_vb.wsdl") Console.WriteLine("'SoapHeaderBindingOut_vb.wsdl' file is generated.") Console.WriteLine("Proxy could be created using " + _ "'wsdl /language:VB SoapHeaderBindingOut_vb.wsdl'.") End Sub 'Main End Class 'MySampleClass
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


