共用方式為


SoapBodyBinding.Parts 屬性

定義

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

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 ,但結果會在陣列內傳回,而不是在以空格分隔的字串內傳回。

適用於