This documentation is archived and is not being maintained.
SoapHeaderBinding Class
Visual Studio 2010
Represents an extensibility element added to an InputBinding or an OutputBinding within an XML Web service.
System::Object
System.Web.Services.Description::ServiceDescriptionFormatExtension
System.Web.Services.Description::SoapHeaderBinding
System.Web.Services.Description::Soap12HeaderBinding
System.Web.Services.Description::ServiceDescriptionFormatExtension
System.Web.Services.Description::SoapHeaderBinding
System.Web.Services.Description::Soap12HeaderBinding
Assembly: System.Web.Services (in System.Web.Services.dll)
The SoapHeaderBinding type exposes the following members.
| 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 a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | 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/.
#using <System.dll> #using <System.Web.Services.dll> #using <System.Xml.dll> using namespace System; using namespace System::Web::Services::Description; using namespace System::Collections; using namespace System::Xml; int main() { ServiceDescription^ myServiceDescription = ServiceDescription::Read( "SoapHeaderBindingInput_cpp.wsdl" ); Binding^ myBinding = gcnew Binding; myBinding->Name = "MyWebServiceSoap"; myBinding->Type = gcnew XmlQualifiedName( "s0:MyWebServiceSoap" ); SoapBinding^ mySoapBinding = gcnew SoapBinding; mySoapBinding->Transport = "http://schemas.xmlsoap.org/soap/http"; mySoapBinding->Style = SoapBindingStyle::Document; myBinding->Extensions->Add( mySoapBinding ); OperationBinding^ myOperationBinding = gcnew OperationBinding; myOperationBinding->Name = "Hello"; SoapOperationBinding^ mySoapOperationBinding = gcnew SoapOperationBinding; mySoapOperationBinding->SoapAction = "http://tempuri.org/Hello"; mySoapOperationBinding->Style = SoapBindingStyle::Document; myOperationBinding->Extensions->Add( mySoapOperationBinding ); // Create InputBinding for operation for the 'SOAP' protocol. InputBinding^ myInputBinding = gcnew InputBinding; SoapBodyBinding^ mySoapBodyBinding = gcnew SoapBodyBinding; mySoapBodyBinding->Use = SoapBindingUse::Literal; myInputBinding->Extensions->Add( mySoapBodyBinding ); SoapHeaderBinding^ mySoapHeaderBinding = gcnew SoapHeaderBinding; mySoapHeaderBinding->Message = gcnew 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. OutputBinding^ myOutputBinding = gcnew 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_cpp.wsdl" ); Console::WriteLine( "'SoapHeaderBindingOut_cpp.wsdl' file is generated." ); Console::WriteLine( "Proxy could be created using 'wsdl SoapHeaderBindingOut_cpp.wsdl'." ); }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:


