SoapServices.GetXmlNamespaceForMethodResponse(MethodBase) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Haalt de XML-naamruimte op die wordt gebruikt tijdens het genereren van antwoorden op de externe aanroep naar de methode die in de opgegeven MethodBasemethode is opgegeven.
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
Parameters
- mb
- MethodBase
De MethodBase methode waarvoor de XML-naamruimte is aangevraagd.
Retouren
De XML-naamruimte die wordt gebruikt tijdens het genereren van antwoorden voor een aanroep van een externe methode.
- Kenmerken
Uitzonderingen
De directe beller heeft geen infrastructuurmachtiging.
Voorbeelden
In het volgende codevoorbeeld ziet u hoe u deze methode gebruikt. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de SoapServices klasse.
// 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);