次の方法で共有


SoapMethodAttribute.ResponseXmlNamespace プロパティ

定義

ターゲット メソッドへのメソッドの応答に使用する XML 要素の名前空間を取得または設定します。

public:
 property System::String ^ ResponseXmlNamespace { System::String ^ get(); void set(System::String ^ value); };
public string ResponseXmlNamespace { get; set; }
member this.ResponseXmlNamespace : string with get, set
Public Property ResponseXmlNamespace As String

プロパティ値

ターゲット メソッドに対するメソッドの応答に使用される XML 要素名前空間。

次のコード例は、ResponseXmlNamespace プロパティの使用方法を示しています。 このコード例は、SoapMethodAttribute クラスのために提供されている大規模な例の一部です。

[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;
}

適用対象