SoapMethodAttribute.ResponseXmlElementName Ö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önteme yöntem yanıtı için kullanılacak XML öğesi adını alır veya ayarlar.
public:
property System::String ^ ResponseXmlElementName { System::String ^ get(); void set(System::String ^ value); };
public string ResponseXmlElementName { get; set; }
member this.ResponseXmlElementName : string with get, set
Public Property ResponseXmlElementName As String
Özellik Değeri
Hedef yönteme yöntem yanıtı için kullanılacak XML öğesi adı.
Örnekler
Aşağıdaki kod örneği özelliğinin ResponseXmlElementName 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;
}
Açıklamalar
Bu özelliğin varsayılan değeri, yöntemin adına eklenen "Yanıt" dizesidir.