Freigeben über


SoapRpcMethodAttribute.RequestNamespace-Eigenschaft

Ruft den XML-Namespace ab, der der SOAP-Anforderung für eine XML-Webdienstmethode zugeordnet ist, oder legt diesen fest.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)

Syntax

'Declaration
Public Property RequestNamespace As String
'Usage
Dim instance As SoapRpcMethodAttribute
Dim value As String

value = instance.RequestNamespace

instance.RequestNamespace = value
public string RequestNamespace { get; set; }
public:
property String^ RequestNamespace {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_RequestNamespace ()

/** @property */
public void set_RequestNamespace (String value)
public function get RequestNamespace () : String

public function set RequestNamespace (value : String)

Eigenschaftenwert

Der XML-Namespace, der der SOAP-Anforderung für eine XML-Webdienstmethode zugeordnet ist. Der Standardnamespace lautet http://tempuri.org/.

Beispiel

Im folgenden Codebeispiel wird die RequestNamespace-Eigenschaft auf https://www.contoso.com festgelegt.

<%@ WebService Language="VB" Class="SoapRpcMethodSample" %>
    
Imports System.Web.Services
Imports System.Web.Services.Protocols

Public Class SoapRpcMethodSample

   <WebMethod(),SoapRpcMethod(RequestNamespace :="https://www.contoso.com",RequestElementName := "MyCustomRequestElement")> _
   Public Function  RequestRpc(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(RequestNamespace="https://www.contoso.com",RequestElementName="MyCustomRequestElement")]
   public int[] RequestRpc(int numentries)
   {
    int[] intarray = new int[numentries];
        for (int i=0;i<numentries;i++)
        {
       intarray[i] = i;
        }
        return intarray;
   }
}

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

SoapRpcMethodAttribute-Klasse
SoapRpcMethodAttribute-Member
System.Web.Services.Protocols-Namespace