System.Web.Services.Protocols.HttpSimpleClientProtocol.BeginInvoke Method

Starts an asynchronous invocation of a method of an XML Web service.

Syntax

protected IAsyncResult BeginInvoke (string methodName, string requestUrl, object[] parameters, AsyncCallback callback, object asyncState)

Parameters

methodName
The name of the XML Web service method.
requestUrl
The URL to use when creating the System.Net.WebRequest.
parameters
An array of objects containing the parameters to pass to the XML Web service method. The order of the values in the array corresponds to the order of the parameters in the calling method of the derived class.
callback
The delegate to call when the asynchronous method call is complete. If callback is null, the delegate is not called.
asyncState
The additional information supplied by a client.

Returns

An IAsyncResult that can be passed to the HttpSimpleClientProtocol.EndInvoke(IAsyncResult) method to obtain the return values from the XML Web service method.

Remarks

The methodName parameter is used to find the types of the parameters and return values of the method that is invoking the HttpSimpleClientProtocol.BeginInvoke(string, string, Object[], AsyncCallback, object) method. It is also used to find custom attributes that may have been added to the method. System.Web.Services.Protocols.SoapDocumentMethodAttribute, System.Web.Services.Protocols.SoapRpcMethodAttribute, and System.Xml.Serialization.XmlElementAttribute provide additional information on the derived method that is required for the HTTP protocol.

asyncState is passed into callback and is included in the IAsyncResult that is returned from the HttpSimpleClientProtocol.BeginInvoke(string, string, Object[], AsyncCallback, object) method. It is useful for passing information from the context of the asynchronous call to the handling of the asynchronous result in callback.

Requirements

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in System.Web.Services.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0