Sunday, September 30, 2007

WebClientProtocol.Timeout Property

Indicates the time an XML Web service client waits for a synchronous XML Web service request to complete (in milliseconds).

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)

Setting the Timeout property to Timeout.Infinite indicates that the request does not time out. Even though an XML Web service client can set the Timeout property to not time out, the Web server can still cause the request to time out on the server side.

Example

The following example sets the Timeout value to 15000 (15 seconds) for the synchronous call to the Add XML Web service method within the Math XML Web service.


math.Timeout = 15000;

WebClientProtocol Class
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.


Verizon Supported : NET Framework 3.0 , 2.0 , 1.1 , 1.0

No comments: