SoapFaultBindingとは? わかりやすく解説

SoapFaultBinding クラス

XML Web サービス内の FaultBinding に追加された機能拡張要素表します

名前空間: System.Web.Services.Description
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public Class SoapFaultBinding
    Inherits ServiceDescriptionFormatExtension
Dim instance As SoapFaultBinding
public class SoapFaultBinding : ServiceDescriptionFormatExtension
public ref class SoapFaultBinding : public
 ServiceDescriptionFormatExtension
public class SoapFaultBinding extends ServiceDescriptionFormatExtension
public class SoapFaultBinding extends
 ServiceDescriptionFormatExtension
解説解説
使用例使用例
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.Object
   System.Web.Services.Description.ServiceDescriptionFormatExtension
    System.Web.Services.Description.SoapFaultBinding
       System.Web.Services.Description.Soap12FaultBinding
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapFaultBinding メンバ
System.Web.Services.Description 名前空間

SoapFaultBinding コンストラクタ


SoapFaultBinding プロパティ


パブリック プロパティパブリック プロパティ

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

関連項目

SoapFaultBinding クラス
System.Web.Services.Description 名前空間

SoapFaultBinding メソッド


SoapFaultBinding メンバ

XML Web サービス内の FaultBinding に追加された機能拡張要素表します

SoapFaultBinding データ型公開されるメンバを以下の表に示します


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

関連項目

SoapFaultBinding クラス
System.Web.Services.Description 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SoapFaultBinding」の関連用語

SoapFaultBindingのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SoapFaultBindingのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS