Export (0) Print
Expand All

WebClientProtocol Class

Specifies the base class for all XML Web service client proxies created using ASP.NET.

For a list of all members of this type, see WebClientProtocol Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Web.Services.Protocols.WebClientProtocol
            System.Web.Services.Protocols.HttpWebClientProtocol

[Visual Basic]
MustInherit Public Class WebClientProtocol
   Inherits Component
[C#]
public abstract class WebClientProtocol : Component
[C++]
public __gc __abstract class WebClientProtocol : public Component
[JScript]
public abstract class WebClientProtocol extends Component

Thread Safety

The properties on this class are copied into a new instance of a WebRequest object for each XML Web service method call. While you can call XML Web service methods on the same WebClientProtocol instance from different threads at the same time, there is no synchronization done to ensure that a consistent snapshot of the properties will get transferred to the WebRequest object. Therefore if you need to modify the properties and make concurrent method calls from different threads you should use a different instance of the XML Web service proxy or provide your own synchronization.

Remarks

The properties of the WebClientProtocol class are used to control the behavior of the transport used to transmit the XML Web service request and response. The properties on this class map to properties found on WebRequest. Instances of classes deriving from WebRequest, such as HttpWebRequest, are used as the transport mechanism for XML Web services created using ASP.NET.To communicate with an XML Web service, you must create a proxy class deriving indirectly or directly from WebClientProtocol for the XML Web service you want to call. Instead of creating the proxy class manually, you can use the Wsdl.exe tool to create a proxy class for a given XML Web service's service description. Since WebClientProtocol is the base class for your client proxy, you will find its properties on your proxy classes. These properties are useful for controlling the request behavior of the underlying transport. For instance, use the Credentials property for calling authenticated XML Web services. Many of the WebClientProtocol properties are used to initialize the WebRequest object that is used to make the Web request.

Requirements

Namespace: System.Web.Services.Protocols

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System.Web.Services (in System.Web.Services.dll)

See Also

WebClientProtocol Members | System.Web.Services.Protocols Namespace | SoapHttpClientProtocol | HttpWebRequest

Show:
© 2014 Microsoft