SoapFaultBinding クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)


このクラスは、返されるすべての SOAP エラー メッセージの内容を指定します。
XML Web サービスのプロトコルの指定の詳細については、「ASP.NET を使用した XML Web サービス」を参照してください。Web サービス記述言語 (WSDL: Web Services Description Language) の詳細については、http://www.w3.org/TR/wsdl/ の仕様を参照してください。

Imports System Imports System.Web.Services.Description Public Class MySoapFaultBindingSample Public Shared Sub Main() Try ' Input wsdl file. Dim myInputWsdlFile As String = "SoapFaultBindingInput_vb.wsdl" ' Output wsdl file. Dim myOutputWsdlFile As String = "SoapFaultBindingOutput_vb.wsdl" ' Initialize an instance of a 'ServiceDescription' object. Dim myServiceDescription As ServiceDescription = ServiceDescription.Read(myInputWsdlFile) ' Get a SOAP binding object with binding name "MyService1Soap". Dim myBinding As Binding = myServiceDescription.Bindings("MyService1Soap") ' 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. Dim myOperationBinding As OperationBinding = myBinding.Operations(0) myOperationBinding.Faults.Add(myFaultBinding) ' Create a new wsdl file. myServiceDescription.Write(myOutputWsdlFile) Console.WriteLine("The new wsdl file created is :" + myOutputWsdlFile) Console.WriteLine("Proxy could be created using command : wsdl /language:VB " + myOutputWsdlFile) Catch e As Exception Console.WriteLine("Error occured : " + e.Message.ToString()) End Try End Sub 'Main End Class 'MySoapFaultBindingSample
using System; using System.Web.Services.Description; public class MySoapFaultBindingSample { public static void Main() { try { // Input wsdl file. string myInputWsdlFile="SoapFaultBindingInput_cs.wsdl"; // Output wsdl file. string myOutputWsdlFile="SoapFaultBindingOutput_cs.wsdl"; // Initialize an instance of a 'ServiceDescription' object. ServiceDescription myServiceDescription = ServiceDescription.Read(myInputWsdlFile); // Get a SOAP binding object with binding name "MyService1Soap". Binding myBinding=myServiceDescription.Bindings["MyService1Soap"]; // 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. OperationBinding myOperationBinding=myBinding.Operations[0]; myOperationBinding.Faults.Add(myFaultBinding); // Create a new wsdl file. myServiceDescription.Write(myOutputWsdlFile); Console.WriteLine("The new wsdl file created is :" +myOutputWsdlFile); Console.WriteLine("Proxy could be created using command : wsdl " + myOutputWsdlFile); } catch(Exception e) { Console.WriteLine("Error occured : "+e.Message); } } }
#using <System.dll> #using <System.Web.Services.dll> #using <System.Xml.dll> using namespace System; using namespace System::Web::Services::Description; int main() { try { // Input wsdl file. String^ myInputWsdlFile = "SoapFaultBindingInput_cpp.wsdl"; // Output wsdl file. String^ myOutputWsdlFile = "SoapFaultBindingOutput_cpp.wsdl"; // Initialize an instance of a 'ServiceDescription' object. ServiceDescription^ myServiceDescription = ServiceDescription::Read( myInputWsdlFile ); // Get a SOAP binding object with binding name S"MyService1Soap". Binding^ myBinding = myServiceDescription->Bindings[ "MyService1Soap" ]; // Create a new instance of 'SoapFaultBinding' class. SoapFaultBinding^ mySoapFaultBinding = gcnew 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 = gcnew FaultBinding; myFaultBinding->Name = "AddFaultbinding"; myFaultBinding->Extensions->Add( mySoapFaultBinding ); // Get existing 'OperationBinding' object. OperationBinding^ myOperationBinding = myBinding->Operations[ 0 ]; myOperationBinding->Faults->Add( myFaultBinding ); // Create a new wsdl file. myServiceDescription->Write( myOutputWsdlFile ); Console::WriteLine( "The new wsdl file created is : {0}", myOutputWsdlFile ); Console::WriteLine( "Proxy could be created using command : wsdl {0}", myOutputWsdlFile ); } catch ( Exception^ e ) { Console::WriteLine( "Error occured : {0}", e->Message ); } }
import System.*; import System.Web.Services.Description.*; public class MySoapFaultBindingSample { public static void main(String[] args) { try { // Input wsdl file. String myInputWsdlFile = "SoapFaultBindingInput_jsl.wsdl"; // Output wsdl file. String myOutputWsdlFile = "SoapFaultBindingOutput_jsl.wsdl"; // Initialize an instance of a 'ServiceDescription' object. ServiceDescription myServiceDescription = ServiceDescription.Read(myInputWsdlFile); // Get a SOAP binding object with binding name "MyService1Soap". Binding myBinding = myServiceDescription.get_Bindings(). get_Item("MyService1Soap"); // Create a new instance of 'SoapFaultBinding' class. SoapFaultBinding mySoapFaultBinding = new SoapFaultBinding(); // Encode fault message using rules specified by 'Encoding' // property. mySoapFaultBinding.set_Use(SoapBindingUse.Encoded); // Set the URI representing the encoding style. mySoapFaultBinding.set_Encoding("http://tempuri.org/stockquote"); // Set the URI representing the location of the specification // for encoding of content not defined by 'Encoding' property'. mySoapFaultBinding.set_Namespace("http://tempuri.org/stockquote"); // Create a new instance of 'FaultBinding'. FaultBinding myFaultBinding = new FaultBinding(); myFaultBinding.set_Name("AddFaultbinding"); myFaultBinding.get_Extensions().Add(mySoapFaultBinding); // Get existing 'OperationBinding' object. OperationBinding myOperationBinding = myBinding.get_Operations(). get_Item(0); myOperationBinding.get_Faults().Add(myFaultBinding); // Create a new wsdl file. myServiceDescription.Write(myOutputWsdlFile); Console.WriteLine("The new wsdl file created is :" + myOutputWsdlFile); Console.WriteLine("Proxy could be created using command : wsdl " + myOutputWsdlFile); } catch (System.Exception e) { Console.WriteLine("Error occured : " + e.get_Message()); } } //main } //MySoapFaultBindingSample

System.Web.Services.Description.ServiceDescriptionFormatExtension
System.Web.Services.Description.SoapFaultBinding
System.Web.Services.Description.Soap12FaultBinding


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapFaultBinding コンストラクタ
アセンブリ: System.Web.Services (system.web.services.dll 内)


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SoapFaultBinding プロパティ

名前 | 説明 | |
---|---|---|
![]() | Encoding | SOAP 違反メッセージのエンコードに使用されるエンコーディング スタイルを表す URI を取得または設定します。 |
![]() | Handled | 機能拡張要素のインポート時に、ServiceDescriptionFormatExtension がインポート プロセスで使用されるかどうかを示す値を取得または設定します。 ( ServiceDescriptionFormatExtension から継承されます。) |
![]() | Name | 指定した操作に定義されている wsdl 違反に SOAP 違反を関連付ける名前属性の値を取得または設定します。 |
![]() | Namespace | Encoding プロパティで特に定義されていない内容のエンコーディングについて記述された仕様の配置場所を表す URI を取得または設定します。 |
![]() | Parent | ServiceDescriptionFormatExtension の親を取得します。 ( ServiceDescriptionFormatExtension から継承されます。) |
![]() | Required | ServiceDescriptionFormatExtension が参照先のアクションに必要かどうかを示す値を取得または設定します。 ( ServiceDescriptionFormatExtension から継承されます。) |
![]() | Use | 違反メッセージを Encoding プロパティで指定されたルールを使用してエンコードするか、具象 XML スキーマ内にカプセル化するかを指定します。 |

SoapFaultBinding メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

SoapFaultBinding メンバ
XML Web サービス内の FaultBinding に追加された機能拡張要素を表します。
SoapFaultBinding データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | Encoding | SOAP 違反メッセージのエンコードに使用されるエンコーディング スタイルを表す URI を取得または設定します。 |
![]() | Handled | 機能拡張要素のインポート時に、ServiceDescriptionFormatExtension がインポート プロセスで使用されるかどうかを示す値を取得または設定します。(ServiceDescriptionFormatExtension から継承されます。) |
![]() | Name | 指定した操作に定義されている wsdl 違反に SOAP 違反を関連付ける名前属性の値を取得または設定します。 |
![]() | Namespace | Encoding プロパティで特に定義されていない内容のエンコーディングについて記述された仕様の配置場所を表す URI を取得または設定します。 |
![]() | Parent | ServiceDescriptionFormatExtension の親を取得します。(ServiceDescriptionFormatExtension から継承されます。) |
![]() | Required | ServiceDescriptionFormatExtension が参照先のアクションに必要かどうかを示す値を取得または設定します。(ServiceDescriptionFormatExtension から継承されます。) |
![]() | Use | 違反メッセージを Encoding プロパティで指定されたルールを使用してエンコードするか、具象 XML スキーマ内にカプセル化するかを指定します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- SoapFaultBindingのページへのリンク