SoapRpcMethodAttribute.Action プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SoapRpcMethodAttribute.Action プロパティの意味・解説 

SoapRpcMethodAttribute.Action プロパティ

SOAP 要求SOAPAction HTTP ヘッダー フィールド取得または設定します

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

Dim instance As SoapRpcMethodAttribute
Dim value As String

value = instance.Action

instance.Action = value
/** @property */
public String get_Action ()

/** @property */
public void set_Action (String value)

プロパティ
SOAP 要求SOAPAction HTTP ヘッダー フィールド既定値http://tempuri.org/MethodName です。MethodName は XML Web サービス メソッドの名前です。

解説解説
使用例使用例

Action プロパティhttp://www.contoso.com/Sample設定するコード例次に示します

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

Public Class MyUser
    Inherits WebService    
    
    <SoapRpcMethod(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 {
 
       [ SoapRpcMethod(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;
 }

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



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

辞書ショートカット

すべての辞書の索引

「SoapRpcMethodAttribute.Action プロパティ」の関連用語

SoapRpcMethodAttribute.Action プロパティのお隣キーワード
検索ランキング

   

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



SoapRpcMethodAttribute.Action プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS