SoapMethodAttribute::XmlNamespace Property

 

Gets or sets the XML namespace that is used during serialization of remote method calls of the target method.

Namespace:   System.Runtime.Remoting.Metadata
Assembly:  mscorlib (in mscorlib.dll)

public:
property String^ XmlNamespace {
	virtual String^ get() override;
	virtual void set(String^ value) override;
}

Property Value

Type: System::String^

The XML namespace that is used during serialization of remote method calls of the target method.

The following code example shows how to use the XmlNamespace property. This code example is part of a larger example provided for the SoapMethodAttribute class.

[SoapMethod(
   ResponseXmlElementName="ExampleResponseElement",
   ResponseXmlNamespace=
   "http://example.org/MethodResponseXmlNamespace",
   ReturnXmlElementName="HelloMessage",
   SoapAction="http://example.org/ExampleSoapAction#GetHello",
   XmlNamespace="http://example.org/MethodCallXmlNamespace")]
String^ GetHello( String^ name )
{
   return String::Format( L"Hello, {0}", name );
}

.NET Framework
Available since 1.1
Return to top
Show: