SoapServices.GetXmlNamespaceForMethodResponse(MethodBase) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the XML namespace used during the generation of responses to the remote call to the method specified in the given 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
- mb
- MethodBase
The MethodBase of the method for which the XML namespace was requested.
The XML namespace used during the generation of responses to a remote method call.
- Attributes
The immediate caller does not have infrastructure permission.
The following code example shows how to use this method. This code example is part of a larger example provided for the SoapServices class.
// 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);
Product | Versions |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: