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

SoapDocumentMethodAttribute クラス

SoapDocumentMethodAttributeメソッド適用することにより、そのメソッドとの間で送受信される SOAP メッセージDocument 書式適用することを指定できます

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

<AttributeUsageAttribute(AttributeTargets.Method)> _
Public NotInheritable Class
 SoapDocumentMethodAttribute
    Inherits Attribute
Dim instance As SoapDocumentMethodAttribute
[AttributeUsageAttribute(AttributeTargets.Method)] 
public sealed class SoapDocumentMethodAttribute
 : Attribute
[AttributeUsageAttribute(AttributeTargets::Method)] 
public ref class SoapDocumentMethodAttribute
 sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.Method) */ 
public final class SoapDocumentMethodAttribute
 extends Attribute
AttributeUsageAttribute(AttributeTargets.Method) 
public final class SoapDocumentMethodAttribute
 extends Attribute
解説解説
使用例使用例

GetUserName XML Web サービス メソッドに対してメッセージ スタイルDocument設定するコード例次に示しますまた、SOAP 要求SOAP 応答Body 要素関連付けられている XML 要素として、それぞれ GetUserNameRequestGetUserNameResponse設定されています。

<%@ WebService Language="VB" class="MyUser"
 %>
Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols

Public Class MyUser
    Inherits WebService    
    
    <SoapDocumentMethod(Action := "http://www.contoso.com/Sample",
 _
    RequestNamespace := "http://www.contoso.com/Request",
 _
    RequestElementName := "GetUserNameRequest", _
    ResponseNamespace := "http://www.contoso.com/Response",
 _
    ResponseElementName := "GetUserNameResponse"),
 _
    WebMethod(Description := "Obtains the User Name")>
 _
    Public Function GetUserName() As
 UserName
        
        Dim temp As String
        Dim pos As Integer
        Dim NewUser As New
 UserName()
        
        ' Get the full user name, including the domain name if applicable.
        temp = User.Identity.Name
        
        ' Deterime whether the user is part of a Domain by searching
 for a backslash.
        pos = temp.IndexOf("\")
        
        ' Parse the domain name out of the string, if one exists.
        If pos <= 0 Then
            NewUser.Name = User.Identity.Name
        Else
            NewUser.Name = temp.Remove(0, pos + 1)
            NewUser.Domain = temp.Remove(pos, temp.Length - pos)
        End If
        Return NewUser
    End Function
End Class 

Public Class UserName
    
    Public Name As String
    Public Domain As String
End Class

<%@ WebService Language="C#" class="MyUser"
 %>
 using System;
 using System.Web.Services;
 using System.Web.Services.Protocols;
 
 public class MyUser : WebService {
 
       [ SoapDocumentMethod(Action="http://www.contoso.com/Sample",
 
           RequestNamespace="http://www.contoso.com/Request"
,
           RequestElementName="GetUserNameRequest",
           ResponseNamespace="http://www.contoso.com/Response"
,
           ResponseElementName="GetUserNameResponse")]
      [ WebMethod(Description="Obtains the User Name") ]
      public UserName GetUserName() {
           string temp;
           int pos;
           UserName NewUser = new UserName();
           
           // Get the full user name, including the domain name if applicable.
           temp = User.Identity.Name;
 
           // Deterime whether the user is part of a domain by searching
 for a backslash.
           pos = temp.IndexOf("\\");
           
           // Parse the domain name out of the string, if one exists.
           if (pos <= 0)
                 NewUser.Name = User.Identity.Name;
           else {
               NewUser.Name = temp.Remove(0,pos+1);
                 NewUser.Domain = temp.Remove(pos,temp.Length-pos);
           } 
       return NewUser;
      }
 
 }   
 
 public class UserName {
 
     public string Name;
     public string Domain;
 }

継承階層継承階層
System.Object
   System.Attribute
    System.Web.Services.Protocols.SoapDocumentMethodAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapDocumentMethodAttribute メンバ
System.Web.Services.Protocols 名前空間
SoapDocumentServiceAttribute
SoapRpcMethodAttribute
SoapRpcServiceAttribute
SoapBindingUse 列挙
SoapParameterStyle

SoapDocumentMethodAttribute コンストラクタ ()


SoapDocumentMethodAttribute コンストラクタ (String)

Action プロパティaction パラメータの値に設定して、SoapDocumentMethodAttribute クラス新しインスタンス初期化します。

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

Dim action As String

Dim instance As New SoapDocumentMethodAttribute(action)
public SoapDocumentMethodAttribute (
    string action
)
public:
SoapDocumentMethodAttribute (
    String^ action
)
public SoapDocumentMethodAttribute (
    String action
)
public function SoapDocumentMethodAttribute
 (
    action : String
)

パラメータ

action

SOAP 要求SOAPAction HTTP ヘッダー フィールドAction プロパティ設定します

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapDocumentMethodAttribute クラス
SoapDocumentMethodAttribute メンバ
System.Web.Services.Protocols 名前空間

SoapDocumentMethodAttribute コンストラクタ

SoapDocumentMethodAttribute クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
SoapDocumentMethodAttribute () SoapDocumentMethodAttribute クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

SoapDocumentMethodAttribute (String) Action プロパティaction パラメータの値に設定してSoapDocumentMethodAttribute クラス新しインスタンス初期化します。

.NET Compact Framework によってサポートされています。

参照参照

関連項目

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

SoapDocumentMethodAttribute プロパティ


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

参照参照

関連項目

SoapDocumentMethodAttribute クラス
System.Web.Services.Protocols 名前空間
SoapDocumentServiceAttribute
SoapRpcMethodAttribute
SoapRpcServiceAttribute
SoapBindingUse 列挙
SoapParameterStyle

SoapDocumentMethodAttribute メソッド


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

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用され指定した型のカスタム属性取得します。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されカスタム属性配列取得します。 ( Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスハッシュ コード返します。 ( Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラス既定値かどうか示します。 ( Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます指定した型のカスタム属性が、アセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されているかどうか判断します。 ( Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンス等しかどうかを示す値を返します。 ( Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SoapDocumentMethodAttribute クラス
System.Web.Services.Protocols 名前空間
SoapDocumentServiceAttribute
SoapRpcMethodAttribute
SoapRpcServiceAttribute
SoapBindingUse 列挙
SoapParameterStyle

SoapDocumentMethodAttribute メンバ

SoapDocumentMethodAttribute をメソッド適用することにより、そのメソッドとの間で送受信される SOAP メッセージDocument 書式適用することを指定できます

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SoapDocumentMethodAttribute オーバーロードされますSoapDocumentMethodAttribute クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます。 ( Attribute から継承されます。)
パブリック メソッド GetCustomAttribute  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用され指定した型のカスタム属性取得します。 (Attribute から継承されます。)
パブリック メソッド GetCustomAttributes  オーバーロードされますアセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されカスタム属性配列取得します。 (Attribute から継承されます。)
パブリック メソッド GetHashCode  このインスタンスハッシュ コード返します。 (Attribute から継承されます。)
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド IsDefaultAttribute  派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラス既定値かどうか示します。 (Attribute から継承されます。)
パブリック メソッド IsDefined  オーバーロードされます指定した型のカスタム属性が、アセンブリモジュール、型のメンバ、またはメソッド パラメータ適用されているかどうか判断します。 (Attribute から継承されます。)
パブリック メソッド Match  派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンス等しかどうかを示す値を返します。 (Attribute から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SoapDocumentMethodAttribute クラス
System.Web.Services.Protocols 名前空間
SoapDocumentServiceAttribute
SoapRpcMethodAttribute
SoapRpcServiceAttribute
SoapBindingUse 列挙
SoapParameterStyle



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

辞書ショートカット

すべての辞書の索引

「SoapDocumentMethodAttribute」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS