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

SoapHeaderCollection クラス

SoapHeader クラスインスタンスコレクション格納します

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

Public Class SoapHeaderCollection
    Inherits CollectionBase
Dim instance As SoapHeaderCollection
public class SoapHeaderCollection : CollectionBase
public ref class SoapHeaderCollection : public
 CollectionBase
public class SoapHeaderCollection extends CollectionBase
public class SoapHeaderCollection extends
 CollectionBase
使用例使用例
<System.Web.Services.WebServiceBindingAttribute(Name := "MathSvcSoap",
 _
    Namespace := "http://tempuri.org/")>
  _
Public Class MathSvc
   Inherits System.Web.Services.Protocols.SoapHttpClientProtocol
   Public mySoapHeaders() As SoapHeader

   <SoapHeaderAttribute("mySoapHeaders", _
      Direction := SoapHeaderDirection.In), _
   System.Web.Services.Protocols.SoapDocumentMethodAttribute( _
      "http://tempuri.org/Add", _
      Use := System.Web.Services.Description.SoapBindingUse.Literal, _
      ParameterStyle := System.Web.Services.Protocols.SoapParameterStyle.Wrapped),
 _
   MySoapExtensionAttribute()>  _
   Public Function Add(xValue As
 System.Single, yValue As System.Single) _
      As System.Single
      Dim mySoapHeaderCollection As New
 SoapHeaderCollection()
      Dim mySoapHeader As MySoapHeader
      mySoapHeader = New MySoapHeader()
      mySoapHeader.text = "This is the first SOAP header"
      mySoapHeaderCollection.Add(mySoapHeader)
      mySoapHeader = New MySoapHeader()
      mySoapHeader.text = "This is the second SOAP header"
      mySoapHeaderCollection.Add(mySoapHeader)
      mySoapHeader = New MySoapHeader()
      mySoapHeader.text = "This header is inserted before the
 first header"
      mySoapHeaderCollection.Insert(0, mySoapHeader)
      mySoapHeaders = New MySoapHeader(mySoapHeaderCollection.Count-1)
 {}
      mySoapHeaderCollection.CopyTo(mySoapHeaders, 0)
      Dim results() As Object
 = _
         Me.Invoke("Add", New
 Object() {xValue, yValue})
      Return CType(results(0), System.Single)
   End Function 'Add

   <System.Diagnostics.DebuggerStepThroughAttribute()>  _
   Public Sub New()
      Me.Url = "http://localhost/MathSvc_SoapHeaderCollection.vb.asmx"
   End Sub 'New

   Public Function BeginAdd(xValue As
 System.Single, yValue As System.Single, _
      callback As System.AsyncCallback, asyncState As
 Object) _
      As System.IAsyncResult
      Return Me.BeginInvoke("Add",
 New Object() {xValue, yValue}, _
         callback, asyncState)
   End Function 'BeginAdd

   Public Function EndAdd(asyncResult As
 System.IAsyncResult) As System.Single
      Dim results As Object()
 = Me.EndInvoke(asyncResult)
      Return CType(results(0), System.Single)
   End Function 'EndAdd
End Class 'MathSvc
[System.Web.Services.WebServiceBindingAttribute(Name="MathSvcSoap",
   Namespace="http://tempuri.org/")]
public class MathSvc : System.Web.Services.Protocols.SoapHttpClientProtocol
 
{ 
   public SoapHeader[] mySoapHeaders;
   
   [SoapHeaderAttribute("mySoapHeaders", 
      Direction=SoapHeaderDirection.In)]
   [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
      "http://tempuri.org/Add", 
      Use=System.Web.Services.Description.SoapBindingUse.Literal, 
      ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
   [MySoapExtensionAttribute()]
   public System.Single Add(System.Single xValue, System.Single
 yValue) 
   {
      SoapHeaderCollection mySoapHeaderCollection = new SoapHeaderCollection();
      MySoapHeader mySoapHeader;
      mySoapHeader = new MySoapHeader();
      mySoapHeader.text = "This is the first SOAP header";
      mySoapHeaderCollection.Add(mySoapHeader);
      mySoapHeader = new MySoapHeader();
      mySoapHeader.text = "This is the second SOAP header";
      mySoapHeaderCollection.Add(mySoapHeader);
      mySoapHeader = new MySoapHeader();
      mySoapHeader.text = "This header is inserted before the first header";
      mySoapHeaderCollection.Insert(0, mySoapHeader);
      mySoapHeaders = new MySoapHeader[mySoapHeaderCollection.Count];
      mySoapHeaderCollection.CopyTo(mySoapHeaders, 0);
      object[] results = this.Invoke("Add", 
         new object[] {xValue, yValue});
      return ((System.Single)(results[0]));
   }

   [System.Diagnostics.DebuggerStepThroughAttribute()]
   public MathSvc() 
   {
      this.Url = "http://localhost/MathSvc_SoapHeaderCollection.cs.asmx";
   }

   public System.IAsyncResult BeginAdd(System.Single xValue,
      System.Single yValue, System.AsyncCallback callback, object asyncState) 
   {
      return this.BeginInvoke("Add",
 new object[] {xValue, yValue}, 
         callback, asyncState);
   }

   public System.Single EndAdd(System.IAsyncResult asyncResult)
 
   {
      object[] results = this.EndInvoke(asyncResult);
      return ((System.Single)(results[0]));
   }
}
[System::Web::Services::WebServiceBindingAttribute(Name="MathSvcSoap",
   Namespace="http://tempuri.org/")]
public ref class MathSvc: public
 System::Web::Services::Protocols::SoapHttpClientProtocol
{
public:
   array<SoapHeader^>^ mySoapHeaders;

   [SoapHeaderAttribute("mySoapHeaders",
      Direction=SoapHeaderDirection::In)]
   [System::Web::Services::Protocols::SoapDocumentMethodAttribute(
      "http://tempuri.org/Add",
      Use=System::Web::Services::Description::SoapBindingUse::Literal,
      ParameterStyle=System::Web::Services::Protocols::SoapParameterStyle::Wrapped)]
   [MySoapExtensionAttribute]
   Single Add( Single xValue, Single yValue )
   {
      SoapHeaderCollection^ mySoapHeaderCollection = gcnew SoapHeaderCollection;
      MySoapHeader^ mySoapHeader;
      mySoapHeader = gcnew MySoapHeader;
      mySoapHeader->text = "This is the first SOAP header";
      mySoapHeaderCollection->Add( mySoapHeader );

      mySoapHeader = gcnew MySoapHeader;
      mySoapHeader->text = "This is the second SOAP header";
      mySoapHeaderCollection->Add( mySoapHeader );

      mySoapHeader = gcnew MySoapHeader;
      mySoapHeader->text = "This header is inserted before the first header";
      mySoapHeaderCollection->Insert( 0, mySoapHeader );

      mySoapHeaders = gcnew array<MySoapHeader^>(mySoapHeaderCollection->Count);
      mySoapHeaderCollection->CopyTo( mySoapHeaders, 0 );

      array<Object^>^ temp0 = {xValue,yValue};
      array<Object^>^ results = this->Invoke( "Add",
 temp0 );
      return ( (Single)( results[ 0 ] ) );
   }

   [System::Diagnostics::DebuggerStepThroughAttribute]
   MathSvc()
   {
      this->Url = "http://localhost/MathSvc_SoapHeaderCollection.cs.asmx";
   }

   System::IAsyncResult^ BeginAdd( Single xValue,
      Single yValue, System::AsyncCallback^ callback, Object^ asyncState )
   {
      array<Object^>^ temp1 = {xValue,yValue};
      return this->BeginInvoke( "Add",
 temp1, callback, asyncState );
   }

   Single EndAdd( System::IAsyncResult^ asyncResult )
   {
      array<Object^>^ results = this->EndInvoke( asyncResult
 );
      return ( (Single)( results[ 0 ] ) );
   }
};
/** @attribute System.Web.Services.WebServiceBindingAttribute(
    Name = "MathSvcSoap", Namespace = "http://tempuri.org/")
 */
public class MathSvc extends System.Web.Services.Protocols.
    SoapHttpClientProtocol
{
    public SoapHeader mySoapHeaders[];

    /** @attribute SoapHeaderAttribute("mySoapHeaders", 
        Direction = SoapHeaderDirection.In)
     */
    /** @attribute System.Web.Services.Protocols.SoapDocumentMethodAttribute(
        "http://tempuri.org/Add", Use = System.Web.Services.Description.
        SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols. 
                   SoapParameterStyle.Wrapped)
     */
    /** @attribute MySoapExtensionAttribute()
     */
    public float Add(float
 xValue, float yValue)
    {
        SoapHeaderCollection mySoapHeaderCollection 
            = new SoapHeaderCollection();
        MySoapHeader mySoapHeader;
        mySoapHeader = new MySoapHeader();
        mySoapHeader.text = "This is the first SOAP header";
        mySoapHeaderCollection.Add(mySoapHeader);
        
        mySoapHeader = new MySoapHeader();
        mySoapHeader.text = "This is the second SOAP header";
        mySoapHeaderCollection.Add(mySoapHeader);
        
        mySoapHeader = new MySoapHeader();
        mySoapHeader.text = "This header is inserted before the first header";
        mySoapHeaderCollection.Insert(0, mySoapHeader);
        
        mySoapHeaders = new MySoapHeader[mySoapHeaderCollection.get_Count()];
        mySoapHeaderCollection.CopyTo(mySoapHeaders, 0);

        Object results[] = this.Invoke("Add", new
 Object[] { 
            (System.Double)xValue, (System.Double)yValue });
        return (float)(System.Double)results.get_Item(0);
    } //Add

    /** @attribute System.Diagnostics.DebuggerStepThroughAttribute()
     */
    public MathSvc()
    {
        this.set_Url("http://localhost/MathSvc_SoapHeaderCollection.jsl.asmx");
    } //MathSvc

    public System.IAsyncResult BeginAdd(float
 xValue, float yValue, 
        System.AsyncCallback callBack, Object asyncState)
    {
        return this.BeginInvoke("Add",
 new Object[] { 
            (System.Double)xValue, (System.Double)yValue }, callBack, 
            asyncState);
    } //BeginAdd

    public float EndAdd(System.IAsyncResult
 asyncResult)
    {
        Object results[] = this.EndInvoke(asyncResult);
        return (float)(System.Double)results.get_Item(0);
    } //EndAdd
} //MathSvc
継承階層継承階層
System.Object
   System.Collections.CollectionBase
    System.Web.Services.Protocols.SoapHeaderCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapHeaderCollection メンバ
System.Web.Services.Protocols 名前空間
SoapHeader クラス
CollectionBase
IList

SoapHeaderCollection コンストラクタ

SoapHeaderCollection クラス新しインスタンス初期化します。

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

Dim instance As New SoapHeaderCollection
public SoapHeaderCollection ()
public:
SoapHeaderCollection ()
public SoapHeaderCollection ()
public function SoapHeaderCollection ()
プラットフォームプラットフォーム
バージョン情報バージョン情報

.NET Framework

サポート対象 : 2.01.11.0

.NET Compact Framework

サポート対象 : 2.01.0
参照参照

関連項目

SoapHeaderCollection クラス
SoapHeaderCollection メンバ
System.Web.Services.Protocols 名前空間

SoapHeaderCollection プロパティ


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

( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ Capacity  CollectionBase に格納できる要素の数を取得または設定します。 ( CollectionBase から継承されます。)
パブリック プロパティ Count  CollectionBase インスタンス格納されている要素の数を取得します。このプロパティオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック プロパティ Item SoapHeaderCollection の指定したインデックスにある SoapHeader を取得または設定します
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ InnerList  CollectionBase インスタンス内の要素リスト格納する ArrayList を取得します。 ( CollectionBase から継承されます。)
プロテクト プロパティ List  CollectionBase インスタンス内の要素リスト格納する IList を取得します。 ( CollectionBase から継承されます。)
参照参照

関連項目

SoapHeaderCollection クラス
System.Web.Services.Protocols 名前空間
SoapHeader クラス
CollectionBase
IList

SoapHeaderCollection メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add SoapHeader を SoapHeaderCollection に追加します
パブリック メソッド Clear  CollectionBase インスタンスかすべてのオブジェクト削除します。このメソッドオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック メソッド Contains SoapHeaderCollection特定の SoapHeader格納されているかどうか確認します
パブリック メソッド CopyTo SoapHeaderCollection要素ArrayコピーしますArray特定のインデックスからコピー開始されます。
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetEnumerator  CollectionBase インスタンス反復処理する列挙子を返します。 ( CollectionBase から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド IndexOf SoapHeaderCollection 内の SoapHeaderインデックス確認します
パブリック メソッド Insert SoapHeaderCollection 内の指定したインデックス位置に、SoapHeader挿入します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド Remove SoapHeaderCollection 内で最初に見つかった特定の SoapHeader削除します
パブリック メソッド RemoveAt  CollectionBase インスタンス指定したインデックスにある要素削除します。このメソッドオーバーライドできません。 ( CollectionBase から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド Finalize  Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 ( Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object簡易コピー作成します。 ( Object から継承されます。)
プロテクト メソッド OnClear  CollectionBase インスタンス内容消去するときに、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnClearComplete  CollectionBase インスタンス内容消去した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnInsert  CollectionBase インスタンス新し要素挿入する前に追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnInsertComplete  CollectionBase インスタンス新し要素挿入した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnRemove  CollectionBase インスタンスか要素削除するときに、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnRemoveComplete  CollectionBase インスタンスか要素削除した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnSet  CollectionBase インスタンスに値を設定する前に追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnSetComplete  CollectionBase インスタンスに値を設定した後に、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
プロテクト メソッド OnValidate  値を検証するときに、追加カスタム プロセス実行します。 ( CollectionBase から継承されます。)
参照参照

関連項目

SoapHeaderCollection クラス
System.Web.Services.Protocols 名前空間
SoapHeader クラス
CollectionBase
IList

SoapHeaderCollection メンバ

SoapHeader クラスインスタンスコレクション格納します

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SoapHeaderCollection  
パブリック プロパティパブリック プロパティ
( プロテクト プロパティ参照)
  名前 説明
パブリック プロパティ Capacity  CollectionBase格納できる要素の数を取得または設定します。(CollectionBase から継承されます。)
パブリック プロパティ Count  CollectionBase インスタンス格納されている要素の数を取得します。このプロパティオーバーライドできません。(CollectionBase から継承されます。)
パブリック プロパティ Item SoapHeaderCollection指定したインデックスにある SoapHeader取得または設定します
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ InnerList  CollectionBase インスタンス内の要素リスト格納する ArrayList を取得します。(CollectionBase から継承されます。)
プロテクト プロパティ List  CollectionBase インスタンス内の要素リスト格納する IList を取得します。(CollectionBase から継承されます。)
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Add SoapHeader を SoapHeaderCollection に追加します
パブリック メソッド Clear  CollectionBase インスタンスかすべてのオブジェクト削除します。このメソッドオーバーライドできません。 (CollectionBase から継承されます。)
パブリック メソッド Contains SoapHeaderCollection特定の SoapHeader格納されているかどうか確認します
パブリック メソッド CopyTo SoapHeaderCollection要素ArrayコピーしますArray特定のインデックスからコピー開始されます。
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetEnumerator  CollectionBase インスタンス反復処理する列挙子を返します。 (CollectionBase から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド IndexOf SoapHeaderCollection 内の SoapHeaderインデックス確認します
パブリック メソッド Insert SoapHeaderCollection 内の指定したインデックス位置に、SoapHeader挿入します
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド Remove SoapHeaderCollection 内で最初に見つかった特定の SoapHeader削除します
パブリック メソッド RemoveAt  CollectionBase インスタンス指定したインデックスにある要素削除します。このメソッドオーバーライドできません。 (CollectionBase から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
  名前 説明
プロテクト メソッド Finalize  Objectガベージ コレクションにより収集される前に、その Objectリソース解放しその他のクリーンアップ操作実行できるようにします。 (Object から継承されます。)
プロテクト メソッド MemberwiseClone  現在の Object簡易コピー作成します。 (Object から継承されます。)
プロテクト メソッド OnClear  CollectionBase インスタンス内容消去するときに、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnClearComplete  CollectionBase インスタンス内容消去した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnInsert  CollectionBase インスタンス新し要素挿入する前に追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnInsertComplete  CollectionBase インスタンス新し要素挿入した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnRemove  CollectionBase インスタンスか要素削除するときに、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnRemoveComplete  CollectionBase インスタンスか要素削除した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnSet  CollectionBase インスタンスに値を設定する前に追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnSetComplete  CollectionBase インスタンスに値を設定した後に、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
プロテクト メソッド OnValidate  値を検証するときに、追加カスタム プロセス実行します。 (CollectionBase から継承されます。)
参照参照

関連項目

SoapHeaderCollection クラス
System.Web.Services.Protocols 名前空間
SoapHeader クラス
CollectionBase
IList



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

辞書ショートカット

すべての辞書の索引

「SoapHeaderCollection」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS