SoapMethodAttribute.XmlNamespace Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Hedef yöntemin uzak yöntem çağrılarının seri hale getirilmesi sırasında kullanılan XML ad alanını alır veya ayarlar.
public:
virtual property System::String ^ XmlNamespace { System::String ^ get(); void set(System::String ^ value); };
public override string XmlNamespace { get; set; }
member this.XmlNamespace : string with get, set
Public Overrides Property XmlNamespace As String
Özellik Değeri
Hedef yöntemin uzak yöntem çağrılarının seri hale getirilmesi sırasında kullanılan XML ad alanı.
Örnekler
Aşağıdaki kod örneği özelliğinin XmlNamespace nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için SoapMethodAttribute sağlanan daha büyük bir örneğin parçasıdır.
[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 );
}
[SoapMethod(
ResponseXmlElementName="ExampleResponseElement",
ResponseXmlNamespace=
"http://example.org/MethodResponseXmlNamespace",
ReturnXmlElementName="HelloMessage",
SoapAction="http://example.org/ExampleSoapAction#GetHello",
XmlNamespace="http://example.org/MethodCallXmlNamespace")]
public string GetHello(string name)
{
return "Hello, " + name;
}