Freigeben über


SoapHeaderBinding.Part-Eigenschaft

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

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

Syntax

'Declaration
Public Property Part As String
'Usage
Dim instance As SoapHeaderBinding
Dim value As String

value = instance.Part

instance.Part = value
public string Part { get; set; }
public:
property String^ Part {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_Part ()

/** @property */
public void set_Part (String value)
public function get Part () : String

public function set Part (value : String)

Eigenschaftenwert

Eine Zeichenfolge, die den Namen des MessagePart darstellt, für den SoapHeaderBinding gilt.

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