SoapRpcMethodAttribute.ResponseNamespace プロパティ
XML Web サービス メソッドに対する SOAP 応答に関連付けられている XML 名前空間を取得または設定します。
Public Property ResponseNamespace As String
[C#]
public string ResponseNamespace {get; set;}
[C++]
public: __property String* get_ResponseNamespace();public: __property void set_ResponseNamespace(String*);
[JScript]
public function get ResponseNamespace() : String;public function set ResponseNamespace(String);
プロパティ値
XML Web サービス メソッドに対する SOAP 応答に関連付けられている XML 名前空間。既定値は http://tempuri.org/ です。
解説
ResponseNamespace プロパティは、XML Web サービスの説明内の Web サービス メソッドを表す XSD スキーマで使用されます。
使用例
[Visual Basic, C#] ResponseNamespace プロパティに https://www.contoso.com
を設定するコード例を次に示します。
<%@ WebService Language="VB" Class="SoapRpcMethodSample" %>
Imports System.Web.Services
Imports System.Web.Services.Protocols
Public Class SoapRpcMethodSample
<WebMethod(),SoapRpcMethod(ResponseNamespace :="https://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
[C#]
<%@ WebService Language="C#" Class="SoapRpcMethodSample" %>
using System.Web.Services;
using System.Web.Services.Protocols;
public class SoapRpcMethodSample
{
[WebMethod]
[SoapRpcMethod(ResponseNamespace="https://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;
}
}
[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET
参照
SoapRpcMethodAttribute クラス | SoapRpcMethodAttribute メンバ | System.Web.Services.Protocols 名前空間