Share via


SoapHeaderException クラス

定義

サーバー エラーの SOAP 表現。

public ref class SoapHeaderException : System::Web::Services::Protocols::SoapException
public class SoapHeaderException : System.Web.Services.Protocols.SoapException
[System.Serializable]
public class SoapHeaderException : System.Web.Services.Protocols.SoapException
type SoapHeaderException = class
    inherit SoapException
[<System.Serializable>]
type SoapHeaderException = class
    inherit SoapException
Public Class SoapHeaderException
Inherits SoapException
継承
属性

次の例では、XML Web サービス クライアントが XML Web サービス メソッドをMyWebMethod呼び出し、プロパティが設定された型MyHeaderの SOAP ヘッダーをtrueMustUnderstand渡します。 XML Web サービス メソッドで SOAP ヘッダーtrueMyHeaderプロパティがDidUnderstand設定されていない場合は、a SoapHeaderException がスローされます。

int main()
{
   MyWebService^ ws = gcnew MyWebService;
   try
   {
      MyHeader^ customHeader = gcnew MyHeader;
      customHeader->MyValue = "Header Value for MyValue";
      customHeader->MustUnderstand = true;
      ws->myHeader = customHeader;
      int results = ws->MyWebMethod( 3, 5 );
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( "Exception: {0}", e );
   }

}
using System;

public class Sample {

    public static void Main() {
        MyWebService ws = new MyWebService();

        try {
            MyHeader customHeader = new MyHeader();
            customHeader.MyValue = "Header Value for MyValue";
            customHeader.MustUnderstand = true;
            ws.myHeader = customHeader;

        int results = ws.MyWebMethod(3,5);
        }
        catch (Exception e) {
            Console.WriteLine ("Exception: {0}", e.ToString());
        }
    }
}
Public Class Sample
    
    Public Shared Sub Main()
        Dim ws As New MyWebService()

        Try
            Dim customHeader As New MyHeader1()

            customHeader.MyValue = "Header Value for MyValue"
            customHeader.MustUnderstand = True

            ws.myHeader = customHeader

        Dim results As Integer

            results = ws.MyWebMethod(3,5)
        Catch e As Exception
            Console.WriteLine("Exception: {0}", e.ToString())
        End Try
    End Sub
End Class

注釈

XML Web サービス クライアントがプロパティを設定trueした XML Web サービス メソッド呼び出しに SOAP ヘッダーをMustUnderstand追加する場合、XML Web サービス メソッドはプロパティをDidUnderstand設定するtrue必要があります。それ以外の場合は、a SoapHeaderException がスローされます。

プロパティは Detail 、SOAP 仕様 SoapHeaderExceptionに従って設定できません。

注意

サービス プロトコルとして SOAP 1.1 仕様を使用するアプリケーションは、SOAP エラーへのアクセスに使用 SoapHeaderException できます。 ただし、SOAP 1.2 仕様を使用するアプリケーションは、SOAP エラーにアクセスするために使用 SoapException する必要があります。

コンストラクター

SoapHeaderException()

SoapHeaderException クラスの新しいインスタンスを初期化します。

SoapHeaderException(SerializationInfo, StreamingContext)

シリアル化を制御するパラメーターを指定して、SoapHeaderException クラスの新しいインスタンスを初期化します。

SoapHeaderException(String, XmlQualifiedName)

SoapHeaderException クラスの新しいインスタンスを初期化します。

SoapHeaderException(String, XmlQualifiedName, Exception)

SoapHeaderException クラスの新しいインスタンスを初期化します。

SoapHeaderException(String, XmlQualifiedName, String)

SoapHeaderException クラスの新しいインスタンスを初期化します。

SoapHeaderException(String, XmlQualifiedName, String, Exception)

SoapHeaderException クラスの新しいインスタンスを初期化します。

SoapHeaderException(String, XmlQualifiedName, String, String, SoapFaultSubCode, Exception)

関連するデータを指定して SoapHeaderException クラスの新しいインスタンスを初期化します。

SoapHeaderException(String, XmlQualifiedName, String, String, String, SoapFaultSubCode, Exception)

関連するデータを指定して SoapHeaderException クラスの新しいインスタンスを初期化します。

プロパティ

Actor

例外の原因となったコードの一部を取得します。

(継承元 SoapException)
Code

SOAP 違反コードの種類を取得します。

(継承元 SoapException)
Data

例外に関する追加のユーザー定義情報を提供する、キーと値のペアのコレクションを取得します。

(継承元 Exception)
Detail

アプリケーション固有のエラー情報を表す XmlNode を取得します。

(継承元 SoapException)
HelpLink

この例外に関連付けられているヘルプ ファイルへのリンクを取得または設定します。

(継承元 Exception)
HResult

特定の例外に割り当てられているコード化数値である HRESULT を取得または設定します。

(継承元 Exception)
InnerException

現在の例外の原因となる Exception インスタンスを取得します。

(継承元 Exception)
Lang

例外に関連付けられている言語を取得します。

(継承元 SoapException)
Message

現在の例外を説明するメッセージを取得します。

(継承元 Exception)
Node

例外の原因となったコードの一部を表す URI を取得します。

(継承元 SoapException)
Role

SOAP メッセージの処理での XML Web サービスの関数を表す URL を取得します。

(継承元 SoapException)
Source

エラーの原因となるアプリケーションまたはオブジェクトの名前を取得または設定します。

(継承元 Exception)
StackTrace

呼び出し履歴で直前のフレームの文字列形式を取得します。

(継承元 Exception)
SubCode

SOAP エラーの subcode XML 要素に含まれるオプションのエラー情報を取得します。

(継承元 SoapException)
TargetSite

現在の例外がスローされたメソッドを取得します。

(継承元 Exception)

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetBaseException()

派生クラスでオーバーライドされた場合、それ以後に発生する 1 つ以上の例外の根本原因である Exception を返します。

(継承元 Exception)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetObjectData(SerializationInfo, StreamingContext)

例外に関する情報を含む SerializationInfo を設定します。

(継承元 SoapException)
GetType()

現在のインスタンスのランタイム型を取得します。

(継承元 Exception)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在の例外の文字列形式を作成して返します。

(継承元 Exception)

events

SerializeObjectState
互換性のために残されています。

例外がシリアル化され、例外に関するシリアル化されたデータを含む例外状態オブジェクトが作成されたときに発生します。

(継承元 Exception)

適用対象

こちらもご覧ください