SoapServices.GetXmlNamespaceForMethodResponse(MethodBase) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Recupera lo spazio dei nomi XML utilizzato durante la generazione di risposte alla chiamata remota al metodo specificato nell'oggetto specificato MethodBase.
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
Parametri
- mb
- MethodBase
Oggetto MethodBase del metodo per il quale è stato richiesto lo spazio dei nomi XML.
Valori restituiti
Spazio dei nomi XML utilizzato durante la generazione di risposte a una chiamata al metodo remoto.
- Attributi
Eccezioni
Il chiamante immediato non dispone dell'autorizzazione dell'infrastruttura.
Esempio
Nell'esempio di codice seguente viene illustrato come usare questo metodo. Questo esempio di codice fa parte di un esempio più ampio fornito per la SoapServices classe .
// 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);