SoapServices.GetXmlNamespaceForMethodResponse(MethodBase) Método

Definición

Recupera el espacio de nombres XML usado durante la generación de respuestas a la llamada remota al método especificado en el especificado MethodBaseen .

public:
 static System::String ^ GetXmlNamespaceForMethodResponse(System::Reflection::MethodBase ^ mb);
public static string GetXmlNamespaceForMethodResponse(System.Reflection.MethodBase mb);
[System.Security.SecurityCritical]
public static string GetXmlNamespaceForMethodResponse(System.Reflection.MethodBase mb);
static member GetXmlNamespaceForMethodResponse : System.Reflection.MethodBase -> string
[<System.Security.SecurityCritical>]
static member GetXmlNamespaceForMethodResponse : System.Reflection.MethodBase -> string
Public Shared Function GetXmlNamespaceForMethodResponse (mb As MethodBase) As String

Parámetros

mb
MethodBase

MethodBase del método para el que se solicitó el espacio de nombres XML.

Devoluciones

Espacio de nombres XML usado durante la generación de respuestas a una llamada de método remoto.

Atributos

Excepciones

El llamador inmediato no tiene permiso de infraestructura.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar este método. Este ejemplo de código forma parte de un ejemplo más grande proporcionado para la SoapServices clase .

// Print the XML namespace for a method invocation and its
// response.
System::Reflection::MethodBase^ getHelloMethod =
   ExampleNamespace::ExampleClass::typeid->GetMethod( L"GetHello" );
String^ methodCallXmlNamespace =
   SoapServices::GetXmlNamespaceForMethodCall( getHelloMethod );
String^ methodResponseXmlNamespace =
   SoapServices::GetXmlNamespaceForMethodResponse( getHelloMethod );
Console::WriteLine( L"The XML namespace for the invocation of the method "
L"GetHello in ExampleClass is {0}.", methodResponseXmlNamespace );
Console::WriteLine( L"The XML namespace for the response of the method "
L"GetHello in ExampleClass is {0}.", methodCallXmlNamespace );
// Print the XML namespace for a method invocation and its
// response.
System.Reflection.MethodBase getHelloMethod = 
    typeof(ExampleNamespace.ExampleClass).GetMethod("GetHello");
string methodCallXmlNamespace = 
    SoapServices.GetXmlNamespaceForMethodCall(getHelloMethod);
string methodResponseXmlNamespace =
    SoapServices.GetXmlNamespaceForMethodResponse(getHelloMethod);
Console.WriteLine(
    "The XML namespace for the invocation of the method " +
    "GetHello in ExampleClass is {0}.",
    methodResponseXmlNamespace);
Console.WriteLine(
    "The XML namespace for the response of the method " +
    "GetHello in ExampleClass is {0}.",
    methodCallXmlNamespace);

Se aplica a