Freigeben über


SoapHeaderBinding.Message-Eigenschaft

Ruft einen Wert ab, der den Namen der Message innerhalb des XML-Webdiensts angibt, für den das SoapHeaderBinding gilt, oder legt diesen fest.

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

Syntax

'Declaration
Public Property Message As XmlQualifiedName
'Usage
Dim instance As SoapHeaderBinding
Dim value As XmlQualifiedName

value = instance.Message

instance.Message = value
public XmlQualifiedName Message { get; set; }
public:
property XmlQualifiedName^ Message {
    XmlQualifiedName^ get ();
    void set (XmlQualifiedName^ value);
}
/** @property */
public XmlQualifiedName get_Message ()

/** @property */
public void set_Message (XmlQualifiedName value)
public function get Message () : XmlQualifiedName

public function set Message (value : XmlQualifiedName)

Eigenschaftenwert

Ein XmlQualifiedName, der den Namen der Message darstellt.

Hinweise

Der Standardwert dieser Eigenschaft ist eine leere Zeichenfolge ("").

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