SoapRpcMethodAttribute.ResponseElementName プロパティ
XML Web サービス メソッドに対する SOAP 応答に関連付けられている XML 要素を取得または設定します。
名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文
Dim instance As SoapRpcMethodAttribute Dim value As String value = instance.ResponseElementName instance.ResponseElementName = value
/** @property */ public String get_ResponseElementName () /** @property */ public void set_ResponseElementName (String value)
public function get ResponseElementName () : String public function set ResponseElementName (value : String)
プロパティ値
XML Web サービス メソッドに対する SOAP 要求に関連付けられている XML 要素。既定値は WebServiceNameResult です。WebServiceName は XML Web サービス メソッドの名前です。


ResponseElementName プロパティを MyCustomResponseElement に設定するコード例を次に示します。
<%@ WebService Language="VB" Class="SoapRpcMethodSample" %> Imports System.Web.Services Imports System.Web.Services.Protocols Public Class SoapRpcMethodSample <WebMethod(),SoapRpcMethod(ResponseNamespace :="http://www.contoso.com",ResponseElementName := "MyCustomResponseElement")> _ Public Function ResponseRpc(numentries as Integer) As Integer() Dim intarray(numentries - 1) as Integer Dim i as Integer For i = 0 To numentries - 1 intarray(i) = i Next Return intarray End Function End Class
<%@ WebService Language="C#" Class="SoapRpcMethodSample" %> using System.Web.Services; using System.Web.Services.Protocols; public class SoapRpcMethodSample { [WebMethod] [SoapRpcMethod(ResponseNamespace="http://www.contoso.com" ,ResponseElementName="MyCustomResponseElement")] public int[] ResponseRpc(int numentries) { int[] intarray = new int[numentries]; for (int i=0;i<numentries;i++) { intarray[i] = i; } return intarray; } }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- SoapRpcMethodAttribute.ResponseElementName プロパティのページへのリンク