違反メッセージを Encoding プロパティで指定されたルールを使用してエンコードするか、具象 XML スキーマ内にカプセル化するかを指定します。
Public Property Use As SoapBindingUse
[C#]
public SoapBindingUse Use {get; set;}
[C++]
public: __property SoapBindingUse get_Use();public: __property void set_Use(SoapBindingUse);
[JScript]
public function get Use() : SoapBindingUse;public function set Use(SoapBindingUse);
プロパティ値
SoapBindingUse 値の 1 つ。既定値は Default です。
使用例
' Create a new instance of 'SoapFaultBinding' class.
Dim mySoapFaultBinding As New SoapFaultBinding()
' Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding.Use = SoapBindingUse.Encoded
' Set the URI representing the encoding style.
mySoapFaultBinding.Encoding = "http://tempuri.org/stockquote"
' Set the URI representing the ___location of the specification
' for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding.Namespace = "http://tempuri.org/stockquote"
' Create a new instance of 'FaultBinding'.
Dim myFaultBinding As New FaultBinding()
myFaultBinding.Name = "AddFaultbinding"
myFaultBinding.Extensions.Add(mySoapFaultBinding)
' Get existing 'OperationBinding' object.
myOperationBinding.Faults.Add(myFaultBinding)
myBinding.Operations.Add(myOperationBinding)
[C#]
// Create a new instance of 'SoapFaultBinding' class.
SoapFaultBinding mySoapFaultBinding=new SoapFaultBinding();
// Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding.Use=SoapBindingUse.Encoded;
// Set the URI representing the encoding style.
mySoapFaultBinding.Encoding="http://tempuri.org/stockquote";
// Set the URI representing the ___location of the specification
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding.Namespace="http://tempuri.org/stockquote";
// Create a new instance of 'FaultBinding'.
FaultBinding myFaultBinding=new FaultBinding();
myFaultBinding.Name="AddFaultbinding";
myFaultBinding.Extensions.Add(mySoapFaultBinding);
// Get existing 'OperationBinding' object.
myOperationBinding.Faults.Add(myFaultBinding);
myBinding.Operations.Add(myOperationBinding);
[C++]
// Create a new instance of 'SoapFaultBinding' class.
SoapFaultBinding* mySoapFaultBinding = new SoapFaultBinding();
// Encode fault message using rules specified by 'Encoding' property.
mySoapFaultBinding->Use=SoapBindingUse::Encoded;
// Set the URI representing the encoding style.
mySoapFaultBinding->Encoding=S"http://tempuri.org/stockquote";
// Set the URI representing the ___location of the specification
// for encoding of content not defined by 'Encoding' property'.
mySoapFaultBinding->Namespace=S"http://tempuri.org/stockquote";
// Create a new instance of 'FaultBinding'.
FaultBinding* myFaultBinding = new FaultBinding();
myFaultBinding->Name=S"AddFaultbinding";
myFaultBinding->Extensions->Add(mySoapFaultBinding);
// Get existing 'OperationBinding' object.
myOperationBinding->Faults->Add(myFaultBinding);
myBinding->Operations->Add(myOperationBinding);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
SoapFaultBinding クラス | SoapFaultBinding メンバ | System.Web.Services.Description 名前空間