Freigeben über


SoapHeaderBinding.Use-Eigenschaft

Gibt an, ob der Header unter Verwendung von Regeln codiert wurde, die durch die Encoding-Eigenschaft angegeben werden, oder ob er in einem bestimmten XML-Schema gekapselt ist.

Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)

Syntax

'Declaration
Public Property Use As SoapBindingUse
'Usage
Dim instance As SoapHeaderBinding
Dim value As SoapBindingUse

value = instance.Use

instance.Use = value
public SoapBindingUse Use { get; set; }
public:
property SoapBindingUse Use {
    SoapBindingUse get ();
    void set (SoapBindingUse value);
}
/** @property */
public SoapBindingUse get_Use ()

/** @property */
public void set_Use (SoapBindingUse value)
public function get Use () : SoapBindingUse

public function set Use (value : SoapBindingUse)

Eigenschaftenwert

Einer der SoapBindingUse-Werte. Der Standardwert ist Default.

Beispiel

Dim mySoapHeaderBinding As New SoapHeaderBinding()
' Set the Message within the XML Web service to which the 
' 'SoapHeaderBinding' applies.
mySoapHeaderBinding.Message = New XmlQualifiedName("s0:HelloMyHeader")
mySoapHeaderBinding.Part = "MyHeader"
mySoapHeaderBinding.Use = SoapBindingUse.Literal
' Add mySoapHeaderBinding to the 'myInputBinding' object.
myInputBinding.Extensions.Add(mySoapHeaderBinding)
SoapHeaderBinding mySoapHeaderBinding=new SoapHeaderBinding();
// Set the Message within the XML Web service to which the 
// 'SoapHeaderBinding' applies.
mySoapHeaderBinding.Message=
               new XmlQualifiedName("s0:HelloMyHeader");
mySoapHeaderBinding.Part="MyHeader";
mySoapHeaderBinding.Use=SoapBindingUse.Literal;
// Add mySoapHeaderBinding to the 'myInputBinding' object. 
myInputBinding.Extensions.Add(mySoapHeaderBinding);
SoapHeaderBinding^ mySoapHeaderBinding = gcnew SoapHeaderBinding;
// Set the Message within the XML Web service to which the
// 'SoapHeaderBinding' applies.
mySoapHeaderBinding->Message =
   gcnew XmlQualifiedName( "s0:HelloMyHeader" );
mySoapHeaderBinding->Part = "MyHeader";
mySoapHeaderBinding->Use = SoapBindingUse::Literal;
// Add mySoapHeaderBinding to the 'myInputBinding' object.
myInputBinding->Extensions->Add( mySoapHeaderBinding );
SoapHeaderBinding mySoapHeaderBinding = new SoapHeaderBinding();
// Set the Message within the XML Web service to which the 
// 'SoapHeaderBinding' applies.
mySoapHeaderBinding.set_Message(new XmlQualifiedName(
    "s0:HelloMyHeader"));
mySoapHeaderBinding.set_Part("MyHeader");
mySoapHeaderBinding.set_Use(SoapBindingUse.Literal);
// Add mySoapHeaderBinding to the 'myInputBinding' object. 
myInputBinding.get_Extensions().Add(mySoapHeaderBinding);

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

SoapHeaderBinding-Klasse
SoapHeaderBinding-Member
System.Web.Services.Description-Namespace