共用方式為


SoapHeaderBinding.Part 屬性

定義

取得或設定值,指出 MessagePart 套用至 XML Web Service 內的哪個 SoapHeaderBinding

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

屬性值

字串,表示套用 MessagePartSoapHeaderBinding 的名稱。

範例

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)

適用於