SoapOperationBinding.SoapAction 属性

定义

获取或设置 SOAP 标头的 URI。

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

属性值

String

包含 SOAP 标头的 URI 的字符串。

示例

// Create the 'SoapOperationBinding' object for the 'SOAP' protocol.
SoapOperationBinding^ mySoapOperationBinding = gcnew SoapOperationBinding;
mySoapOperationBinding->SoapAction = "http://tempuri.org/AddNumbers";
mySoapOperationBinding->Style = SoapBindingStyle::Document;

// Add the 'SoapOperationBinding' object to 'OperationBinding' object.
myOperationBinding->Extensions->Add( mySoapOperationBinding );
// Create the 'SoapOperationBinding' object for the 'SOAP' protocol.
SoapOperationBinding mySoapOperationBinding =
                                 new SoapOperationBinding();
mySoapOperationBinding.SoapAction  = "http://tempuri.org/AddNumbers";
mySoapOperationBinding.Style = SoapBindingStyle.Document;
// Add the 'SoapOperationBinding' object to 'OperationBinding' object.
myOperationBinding.Extensions.Add(mySoapOperationBinding);
' Create the 'SoapOperationBinding' object for the 'SOAP' protocol.
Dim mySoapOperationBinding As New SoapOperationBinding()
mySoapOperationBinding.SoapAction = "http://tempuri.org/AddNumbers"
mySoapOperationBinding.Style = SoapBindingStyle.Document
' Add the 'SoapOperationBinding' object to 'OperationBinding' object.
myOperationBinding.Extensions.Add(mySoapOperationBinding)

注解

SOAP 的 HTTP 协议绑定需要此属性。 默认值为空字符串 ("")。

适用于