SoapMessage.OneWay 属性

定义

获取一个值,该值指示应用于 XML Web services 方法的 OneWaySoapDocumentMethodAttribute 特性的 SoapRpcMethodAttribute 属性。

public:
 abstract property bool OneWay { bool get(); };
public abstract bool OneWay { get; }
member this.OneWay : bool
Public MustOverride ReadOnly Property OneWay As Boolean

属性值

Boolean

如果应用于 XML Web services 方法的 OneWaySoapDocumentMethodAttributeSoapRpcMethodAttribute 属性为 true,则为 true;否则为 false

示例

if ( message->OneWay )
{
   myStreamWriter->WriteLine(
      "The method invoked on the client shall not wait"
      + " till the server finishes" );
}
else
{
   myStreamWriter->WriteLine(
      "The method invoked on the client shall wait"
      + " till the server finishes" );
}
if(message.OneWay)
   myStreamWriter.WriteLine(
      "The method invoked on the client shall not wait"
      + " till the server finishes");
else
   myStreamWriter.WriteLine(
      "The method invoked on the client shall wait"
      + " till the server finishes");
If message.OneWay Then
   myStreamWriter.WriteLine( _
      "The method invoked on the client shall not wait" & _
      " till the server finishes")
Else
   myStreamWriter.WriteLine( _
      "The method invoked on the client shall wait" & _
      " till the server finishes")
End If

注解

SoapDocumentMethodAttribute.OneWay有关单向 XML Web 服务方法的详细信息,请参阅或SoapRpcMethodAttribute查看属性SoapDocumentMethodAttribute

属性 OneWay 在所有阶段 SoapMessageStage都可访问。

适用于

另请参阅