SoapBodyBinding.Parts 属性

定义

获取或设置一个值,该值指示传输的消息的哪些部分出现在该传输的 SOAP 体部分。

public:
 property cli::array <System::String ^> ^ Parts { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[] Parts { get; set; }
member this.Parts : string[] with get, set
Public Property Parts As String()

属性值

String[]

包含适当消息部分的名称的字符串数组。

示例

SoapBinding^ mySoapBinding = gcnew SoapBinding;
mySoapBinding->Transport = "http://schemas.xmlsoap.org/soap/http";
mySoapBinding->Style = SoapBindingStyle::Document;
// Get the URI for XML namespace of the SoapBinding class.
String^ myNameSpace = SoapBinding::Namespace;
Console::WriteLine( "The URI of the XML Namespace is :{0}", myNameSpace );
SoapBinding mySoapBinding = new SoapBinding();
mySoapBinding.Transport = "http://schemas.xmlsoap.org/soap/http";
mySoapBinding.Style = SoapBindingStyle.Document;
// Get the URI for XML namespace of the SoapBinding class.
String myNameSpace = SoapBinding.Namespace;
Console.WriteLine("The URI of the XML Namespace is :"+myNameSpace);
Dim mySoapBinding As New SoapBinding()
mySoapBinding.Transport = "http://schemas.xmlsoap.org/soap/http"
mySoapBinding.Style = SoapBindingStyle.Document
' Get the URI for XML namespace of the SoapBinding class.
Dim myNameSpace As String = SoapBinding.Namespace
Console.WriteLine("The URI of the XML Namespace is :" + myNameSpace)

注解

传输的消息的某些部分可以显示在 SOAP 正文以外的部分,例如当 SOAP 与 一起使用 MimeMultipartRelatedBinding时。 在这种情况下,属性的 Extensions 其他成员将确定消息其他部分的位置。

此属性返回的信息 PartsString 与 属性完全相同,但结果在数组中返回,而不是在空格分隔的字符串中返回。

适用于