WebReference.ProtocolName 属性

定义

获取或设置与 Web 引用关联的协议。Gets or sets the protocol associated with the Web reference.

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

属性值

String

包含与 Web 引用关联的协议名称的 StringA String containing the name of the protocol associated with the Web reference.

示例

下面的代码示例演示如何使用此属性。The following code example illustrates the use of this property. 此代码示例是为类提供的更大示例的一部分 WebReferenceThis code example is part of a larger example provided for the WebReference class.

// Create a web referernce using the WSDL collection.
WebReference reference = new WebReference(wsdlCollection, space);
reference.ProtocolName = "Soap12";

注解

允许的协议字符串包括 "Soap" (指示 SOAP 1.0)和 "Soap12" (指示 SOAP 1.2)。Allowed protocol strings include "Soap" (indicating SOAP 1.0) and "Soap12" (indicating SOAP 1.2). 此属性的值确定代理客户端在与集合中的任何 XML Web service 联系时使用的协议 DocumentsThe value of this property determines the protocol used by proxy clients when contacting any XML Web service in the Documents collection.

有关 SOAP 的详细信息,请参阅万维网联合会网站。For more information on SOAP, see the World Wide Web Consortium website.

适用于