SoapBodyBinding.PartsString 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示传输的消息的哪些部分出现在该传输的 SOAP 体部分。
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 与 a MimeMultipartRelatedBinding配合使用时。 在这种情况下,属性的 Extensions 其他成员确定消息的其他部分的位置。
此属性返回与属性完全相同的信息 Parts ,但在以空格分隔的字符串而不是数组内返回结果。 PartsString 在内部用于 xml 序列化,不应直接调用。 若要返回传输的 SOAP 正文部分中显示的已传输消息部分,请使用 Parts 该属性。