Share via


SoapMethodAttribute.SoapAction プロパティ

定義

このメソッドで送信された HTTP 要求で使用する SOAPAction ヘッダー フィールドを取得または設定します。 このプロパティは現在実装されていません。

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

プロパティ値

このメソッドで送信された HTTP 要求で使用する SOAPAction ヘッダー フィールド。

次のコード例は、SoapAction プロパティの使用方法を示しています。 このコード例は、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;
}

注釈

このプロパティは現在実装されていません。

SOAPAction HTTP 要求ヘッダー フィールドは、SOAP HTTP 要求の意図を示します。 SOAPAction フィールドの詳細については、W3C 仕様 の「SOAPAction HTTP ヘッダー フィールド」 セクションを参照してください。

適用対象