Edit

Share via


SoapMethodAttribute.SoapAction Property

Definition

Gets or sets the SOAPAction header field used with HTTP requests sent with this method. This property is currently not implemented.

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

Property Value

The SOAPAction header field used with HTTP requests sent with this method.

Examples

The following code example shows how to use the SoapAction 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 );
}
[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;
}

Remarks

This property is currently not implemented.

The SOAPAction HTTP request header field indicates the intent of the SOAP HTTP request. For more information on the SOAPAction field, see The SOAPAction HTTP Header Field section of the W3C specification.

Applies to