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


このクラスのインスタンスは、親 Operation インスタンスの Faults プロパティのメンバです。
OperationFault クラスは、operation 要素で囲まれた WSDL (Web Services Description Language) fault 要素に対応します。さらに、この要素は portType 要素で囲まれます。WSDL の詳細については、http://www.w3.org/TR/wsdl/ の仕様を参照してください。

OperationFault クラスによって公開されるプロパティとメソッドを使用する例を次に示します。
Imports System Imports System.Web.Services.Description Imports System.Xml Imports System.Xml.Schema Imports System.Xml.Serialization Imports Microsoft.VisualBasic Public Class MyOperationFaultSample Public Shared Sub Main() Try ' Read the 'StockQuote_vb.wsdl' file as input. Dim myServiceDescription As ServiceDescription = _ ServiceDescription.Read("StockQuote_vb.wsdl") Dim myPortTypeCollection As PortTypeCollection = _ myServiceDescription.PortTypes Dim myPortType As PortType = myPortTypeCollection(0) Dim myOperationCollection As OperationCollection = myPortType.Operations Dim myOperation As Operation = myOperationCollection(0) Dim myOperationFault As New OperationFault() myOperationFault.Name = "ErrorString" myOperationFault.Message = _ New XmlQualifiedName("s0:GetTradePriceStringFault") myOperation.Faults.Add(myOperationFault) Console.WriteLine("Added OperationFault with Name: " + _ myOperationFault.Name) myOperationFault = New OperationFault() myOperationFault.Name = "ErrorInt" myOperationFault.Message = _ New XmlQualifiedName("s0:GetTradePriceIntFault") myOperation.Faults.Add(myOperationFault) myOperationCollection.Add(myOperation) Console.WriteLine("Added Second OperationFault with Name: " + _ myOperationFault.Name) myServiceDescription.Write("StockQuoteNew_vb.wsdl") Console.WriteLine(ControlChars.NewLine + _ "The file 'StockQuoteNew_vb.wsdl' is " + _ "created successfully.") Catch e As Exception Console.WriteLine("Exception caught!!!") Console.WriteLine("Source : " + e.Source) Console.WriteLine("Message : " + e.Message) End Try End Sub End Class
using System; using System.Web.Services.Description; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; public class MyOperationFaultSample { public static void Main() { try { // Read the 'StockQuote_cs.wsdl' file as input. ServiceDescription myServiceDescription = ServiceDescription. Read("StockQuote_cs.wsdl"); PortTypeCollection myPortTypeCollection = myServiceDescription. PortTypes; PortType myPortType = myPortTypeCollection[0]; OperationCollection myOperationCollection = myPortType.Operations; Operation myOperation = myOperationCollection[0]; OperationFault myOperationFault = new OperationFault(); myOperationFault.Name = "ErrorString"; myOperationFault.Message = new XmlQualifiedName ("s0:GetTradePriceStringFault"); myOperation.Faults.Add(myOperationFault); Console.WriteLine("Added OperationFault with Name: " + myOperationFault.Name); myOperationFault = new OperationFault(); myOperationFault.Name = "ErrorInt"; myOperationFault.Message = new XmlQualifiedName ("s0:GetTradePriceIntFault"); myOperation.Faults.Add(myOperationFault); myOperationCollection.Add(myOperation); Console.WriteLine("Added Second OperationFault with Name: " +myOperationFault.Name); myServiceDescription.Write("StockQuoteNew_cs.wsdl"); Console.WriteLine("\nThe file 'StockQuoteNew_cs.wsdl' is " + "created successfully."); } catch(Exception e) { Console.WriteLine("Exception caught!!!"); Console.WriteLine("Source : " + e.Source); Console.WriteLine("Message : " + e.Message); } } }
#using <System.dll> #using <System.Web.Services.dll> #using <System.Xml.dll> using namespace System; using namespace System::Web::Services::Description; using namespace System::Xml; using namespace System::Xml::Schema; using namespace System::Xml::Serialization; int main() { try { // Read the 'StockQuote_cpp.wsdl' file as input. ServiceDescription^ myServiceDescription = ServiceDescription::Read( "StockQuote_cpp.wsdl" ); PortTypeCollection^ myPortTypeCollection = myServiceDescription->PortTypes; PortType^ myPortType = myPortTypeCollection[ 0 ]; OperationCollection^ myOperationCollection = myPortType->Operations; Operation^ myOperation = myOperationCollection[ 0 ]; OperationFault^ myOperationFault = gcnew OperationFault; myOperationFault->Name = "ErrorString"; myOperationFault->Message = gcnew XmlQualifiedName( "s0:GetTradePriceStringFault" ); myOperation->Faults->Add( myOperationFault ); Console::WriteLine( "Added OperationFault with Name: {0}", myOperationFault->Name ); myOperationFault = gcnew OperationFault; myOperationFault->Name = "ErrorInt"; myOperationFault->Message = gcnew XmlQualifiedName( "s0:GetTradePriceIntFault" ); myOperation->Faults->Add( myOperationFault ); myOperationCollection->Add( myOperation ); Console::WriteLine( "Added Second OperationFault with Name: {0}", myOperationFault->Name ); myServiceDescription->Write( "StockQuoteNew_cpp.wsdl" ); Console::WriteLine( "\nThe file 'StockQuoteNew_cpp.wsdl' is created successfully." ); } catch ( Exception^ e ) { Console::WriteLine( "Exception caught!!!" ); Console::WriteLine( "Source : {0}", e->Source ); Console::WriteLine( "Message : {0}", e->Message ); } }
import System.*; import System.Web.Services.Description.*; import System.Xml.*; import System.Xml.Schema.*; import System.Xml.Serialization.*; public class MyOperationFaultSample { public static void main(String[] args) { try { // Read the 'StockQuote_jsl.wsdl' file as input. ServiceDescription myServiceDescription = ServiceDescription. Read("StockQuote_jsl.wsdl"); PortTypeCollection myPortTypeCollection = myServiceDescription. get_PortTypes(); PortType myPortType = myPortTypeCollection.get_Item(0); OperationCollection myOperationCollection = myPortType. get_Operations(); Operation myOperation = myOperationCollection.get_Item(0); OperationFault myOperationFault = new OperationFault(); myOperationFault.set_Name("ErrorString"); myOperationFault.set_Message(new XmlQualifiedName( "s0:GetTradePriceStringFault")); myOperation.get_Faults().Add(myOperationFault); Console.WriteLine("Added OperationFault with Name: " + myOperationFault.get_Name()); myOperationFault = new OperationFault(); myOperationFault.set_Name("ErrorInt"); myOperationFault.set_Message(new XmlQualifiedName( "s0:GetTradePriceIntFault")); myOperation.get_Faults().Add(myOperationFault); myOperationCollection.Add(myOperation); Console.WriteLine("Added Second OperationFault with Name: " + myOperationFault.get_Name()); myServiceDescription.Write("StockQuoteNew_jsl.wsdl"); Console.WriteLine("\nThe file 'StockQuoteNew_jsl.wsdl' is " + "created successfully."); } catch (System.Exception e) { Console.WriteLine("Exception caught!!!"); Console.WriteLine("Source : " + e.get_Source()); Console.WriteLine("Message : " + e.get_Message()); } } //main } //MyOperationFaultSample

System.Web.Services.Description.DocumentableItem
System.Web.Services.Description.NamedItem
System.Web.Services.Description.OperationMessage
System.Web.Services.Description.OperationFault


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


OperationFault コンストラクタ
アセンブリ: 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


OperationFault プロパティ

名前 | 説明 | |
---|---|---|
![]() | Documentation | DocumentableItem のインスタンスのテキスト ドキュメントを取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | DocumentationElement | DocumentableItem のドキュメント要素を取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | ExtensibleAttributes | Web Services Interoperability (WS-I) Basic Profile 1.1 に準拠する WSDL の属性の拡張機能を表す XmlAttribute 型の配列を取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | Extensions | オーバーライドされます。 この OperationFault に関連付けられている ServiceDescriptionFormatExtensionCollection を取得します。 |
![]() | Message | 通信データの抽象的な型定義を取得または設定します。 ( OperationMessage から継承されます。) |
![]() | Name | 項目の名前を取得または設定します。 ( NamedItem から継承されます。) |
![]() | Namespaces | ServiceDescription オブジェクトが生成されるときに名前空間プレフィックスと名前空間を保持するために使用する、名前空間プレフィックスと名前空間のディクショナリを取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | Operation | OperationMessage がメンバとして含まれている Operation を取得します。 ( OperationMessage から継承されます。) |

OperationFault メソッド

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

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

OperationFault メンバ
XML Web サービスから返されるエラー メッセージの仕様を定義します。このクラスは継承できません。
OperationFault データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | OperationFault |

名前 | 説明 | |
---|---|---|
![]() | Documentation | DocumentableItem のインスタンスのテキスト ドキュメントを取得または設定します。(DocumentableItem から継承されます。) |
![]() | DocumentationElement | DocumentableItem のドキュメント要素を取得または設定します。(DocumentableItem から継承されます。) |
![]() | ExtensibleAttributes | Web Services Interoperability (WS-I) Basic Profile 1.1 に準拠する WSDL の属性の拡張機能を表す XmlAttribute 型の配列を取得または設定します。(DocumentableItem から継承されます。) |
![]() | Extensions | オーバーライドされます。 この OperationFault に関連付けられている ServiceDescriptionFormatExtensionCollection を取得します。 |
![]() | Message | 通信データの抽象的な型定義を取得または設定します。(OperationMessage から継承されます。) |
![]() | Name | 項目の名前を取得または設定します。(NamedItem から継承されます。) |
![]() | Namespaces | ServiceDescription オブジェクトが生成されるときに名前空間プレフィックスと名前空間を保持するために使用する、名前空間プレフィックスと名前空間のディクショナリを取得または設定します。(DocumentableItem から継承されます。) |
![]() | Operation | OperationMessage がメンバとして含まれている Operation を取得します。(OperationMessage から継承されます。) |

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

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

- OperationFaultのページへのリンク