Freigeben über


SoapHeaderBinding.Part Eigenschaft

Definition

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

public:
 property System::String ^ Part { System::String ^ get(); void set(System::String ^ value); };
public string Part { get; set; }
member this.Part : string with get, set
Public Property Part As String

Eigenschaftswert

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

Beispiele

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.Message=
               new XmlQualifiedName("s0:HelloMyHeader");
mySoapHeaderBinding.Part="MyHeader";
mySoapHeaderBinding.Use=SoapBindingUse.Literal;
// Add mySoapHeaderBinding to the 'myInputBinding' object.
myInputBinding.Extensions.Add(mySoapHeaderBinding);
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)

Gilt für: