Export (0) Print
Expand All

HttpWebClientProtocol Class

The base class for all XML Web service client proxies that use the HTTP transport protocol.

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

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Web.Services.Protocols.WebClientProtocol
            System.Web.Services.Protocols.HttpWebClientProtocol
               System.Web.Services.Discovery.DiscoveryClientProtocol
               System.Web.Services.Protocols.HttpSimpleClientProtocol
               System.Web.Services.Protocols.SoapHttpClientProtocol

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

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 on this class are used to control the behavior of the HTTP request object used to transmit the XML Web service request and response. The properties map to properties found on HttpWebRequest.

To communicate with an XML Web service using HTTP, you must create a proxy class deriving indirectly or directly from HttpWebClientProtocol for the XML Web service. 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 HttpWebClientProtocol is the base class for all proxy classes, you will find its properties on your proxy classes. These properties are useful for controlling the request behavior of the underlying transport. For example, use the Proxy property for calling XML Web services through a firewall. Many of these properties are used to initialize the HttpWebRequest making the Web request.

SoapHttpClientProtocol, HttpGetClientProtocol, and HttpPostClientProtocol derive directly or indirectly from HttpWebClientProtocol to provide support for SOAP, HTTP-GET and HTTP-POST respectively.

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

HttpWebClientProtocol Members | System.Web.Services.Protocols Namespace | WebClientProtocol | WebRequest | SoapHttpClientProtocol | HttpGetClientProtocol | HttpPostClientProtocol

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft