共用方式為


SoapBodyBinding.PartsString 屬性

定義

取得或設定值,指出傳輸訊息的那些部分出現在傳輸的 SOAP Body 部分中。

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

屬性值

空格分隔的字串,包含適當的訊息部分。

範例

// Create the 'InputBinding' object for the 'SOAP' protocol.
InputBinding^ myInput = gcnew InputBinding;
SoapBodyBinding^ mySoapBinding1 = gcnew SoapBodyBinding;
mySoapBinding1->PartsString = "parameters";
mySoapBinding1->Use = SoapBindingUse::Literal;
myInput->Extensions->Add( mySoapBinding1 );

// Assign the 'InputBinding' to 'OperationBinding'.
myOperationBinding->Input = myInput;

// Create the 'OutputBinding' object' for the 'SOAP' protocol..
OutputBinding^ myOutput = gcnew OutputBinding;
myOutput->Extensions->Add( mySoapBinding1 );

// Assign the 'OutPutBinding' to 'OperationBinding'.
myOperationBinding->Output = myOutput;
// Create the 'InputBinding' object for the 'SOAP' protocol.
InputBinding myInput = new InputBinding();
SoapBodyBinding mySoapBinding1 = new SoapBodyBinding();
mySoapBinding1.PartsString = "parameters";
mySoapBinding1.Use= SoapBindingUse.Literal;
myInput.Extensions.Add(mySoapBinding1);
// Assign the 'InputBinding' to 'OperationBinding'.
myOperationBinding.Input = myInput;
// Create the 'OutputBinding' object' for the 'SOAP' protocol..
OutputBinding myOutput = new OutputBinding();
myOutput.Extensions.Add(mySoapBinding1);
 // Assign the 'OutPutBinding' to 'OperationBinding'.
myOperationBinding.Output = myOutput;
' Create the 'InputBinding' object for the 'SOAP' protocol.
Dim myInput As New InputBinding()
Dim mySoapBinding1 As New SoapBodyBinding()
mySoapBinding1.PartsString = "parameters"
mySoapBinding1.Use = SoapBindingUse.Literal
myInput.Extensions.Add(mySoapBinding1)
' Assign the 'InputBinding' to 'OperationBinding'.
myOperationBinding.Input = myInput
' Create the 'OutputBinding' object' for the 'SOAP' protocol..
Dim myOutput As New OutputBinding()
myOutput.Extensions.Add(mySoapBinding1)
' Assign the 'OutPutBinding' to 'OperationBinding'.
myOperationBinding.Output = myOutput

備註

傳輸訊息的某些部分可以出現在 SOAP 主體以外的部分,例如當 SOAP 與 搭配 MimeMultipartRelatedBinding 使用時。 在這種情況下,屬性的 Extensions 其他成員會決定訊息其他部分的位置。

這個屬性會傳回與 屬性完全相同的資訊 Parts ,但結果會在以空格分隔的字串內傳回,而不是在陣列內傳回。 PartsString 會在內部用於 xml 序列化,不應直接呼叫。 若要傳回傳輸中出現在 SOAP 主體部分內的傳輸訊息部分,請使用 Parts 屬性。

適用於