SoapRpcServiceAttribute クラス

定義

XML Web サービス内の XML Web サービス メソッドとの間で送受信される SOAP 要求と SOAP 応答の既定の形式を設定します。

public ref class SoapRpcServiceAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class SoapRpcServiceAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class)>]
type SoapRpcServiceAttribute = class
    inherit Attribute
Public NotInheritable Class SoapRpcServiceAttribute
Inherits Attribute
継承
SoapRpcServiceAttribute
属性

SoapRpcServiceAttribute クラスを使用する方法を示す例を次に示します。

<%@ WebService Language="c#" Class="SumService" %>

using System;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Services.Description;

    [SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
    public class SumService : System.Web.Services.WebService
    {
        [WebMethod]
        public int Add(int a, int b)
        {
            return a + b;
        }
    }
<%@ WebService Language="VB" Class="SumService" %>

Imports System
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Services.Description

    <SoapRpcServiceAttribute(RoutingStyle:=SoapServiceRoutingStyle.SoapAction)> _
    Public Class SumService 
          Inherits System.Web.Services.WebService
    
        <WebMethod> _
        Public Function Add(a As Integer, b as Integer)
           return a + b
        End Function
    End Class

注釈

SoapRpcServiceAttributeを使用すると、XML Web サービス内の XML Web サービス メソッドの既定のエンコード スタイルをメソッド エンコードとEncodedパラメーター エンコードにRPC設定できます。

Web サービス記述言語 (WSDL) では、XML Web サービス メソッド (操作) を SOAP 要求または SOAP 応答 RPC でエンコードする方法として、 と Documentの 2 つのスタイルを定義します。 このスタイルは RPC 、SOAP for RPC を使用するための SOAP 仕様のセクション 7 に従って XML Web サービスメソッドをエンコードすることを指します。 このスタイルでは、すべてのパラメーターが XML Web サービス メソッドの名前の付いた 1 つの要素内にカプセル化され、その要素内の各要素がそれぞれのパラメーター名の後にという名前のパラメーターを表すように指定します。

既定のメソッド レベルのエンコードを に Document設定するには、 を XML Web サービスを実装するクラスに を適用 SoapDocumentServiceAttribute します。

詳細については、「 SOAP メッセージの書式設定のカスタマイズ」を参照してください。

この属性は、XML Web サービスを実装するクラスに適用できます。

コンストラクター

SoapRpcServiceAttribute()

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

プロパティ

RoutingStyle

SOAP メッセージを XML Web サービスにルーティングする方法を取得または設定します。

TypeId

派生クラスで実装されると、この Attribute の一意の識別子を取得します。

(継承元 Attribute)
Use

Web サービスのメソッドを呼び出すときに使用されるバインディングを取得または設定します。

メソッド

Equals(Object)

このインスタンスが、指定されたオブジェクトと等価であるかどうかを示す値を返します。

(継承元 Attribute)
GetHashCode()

このインスタンスのハッシュ コードを返します。

(継承元 Attribute)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
IsDefaultAttribute()

派生クラスでオーバーライドされるとき、このインスタンスの値が派生クラスの既定値であるかどうかを示します。

(継承元 Attribute)
Match(Object)

派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。

(継承元 Attribute)
MemberwiseClone()

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

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

一連の名前を対応する一連のディスパッチ識別子に割り当てます。

(継承元 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

オブジェクトの型情報を取得します。この情報はインターフェイスの型情報の取得に使用できます。

(継承元 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

オブジェクトが提供する型情報インターフェイスの数 (0 または 1) を取得します。

(継承元 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

オブジェクトによって公開されたプロパティおよびメソッドへのアクセスを提供します。

(継承元 Attribute)

適用対象

こちらもご覧ください