This documentation is archived and is not being maintained.

HttpSimpleClientProtocol.BeginInvoke Method

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

[Visual Basic]
Protected Function BeginInvoke( _
   ByVal methodName As String, _
   ByVal requestUrl As String, _
   ByVal parameters() As Object, _
   ByVal callback As AsyncCallback, _
   ByVal asyncState As Object _
) As IAsyncResult
[C#]
protected IAsyncResult BeginInvoke(
 string methodName,
 string requestUrl,
 object[] parameters,
 AsyncCallback callback,
 object asyncState
);
[C++]
protected: IAsyncResult* BeginInvoke(
 String* methodName,
 String* requestUrl,
 Object* parameters __gc[],
 AsyncCallback* callback,
 Object* asyncState
);
[JScript]
protected function BeginInvoke(
   methodName : String,
 requestUrl : String,
 parameters : Object[],
 callback : AsyncCallback,
 asyncState : Object
) : IAsyncResult;

Parameters

methodName
The name of the XML Web service method.
requestUrl
The url to use when creating the 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 correspond 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 a null reference (Nothing in Visual Basic), the delegate is not called.
asyncState
Additional information supplied by a client.

Return Value

An IAsyncResult which can be passed to EndInvoke to obtain the return values from the XML Web service method.

Exceptions

Exception Type Condition
Exception The request reached the server computer, but was not processed successfully.

Remarks

The methodName parameter is used to find the types of the parameters and return values of the method that is invoking BeginInvoke. It is also used to find custom attributes which may have been added to the method. SoapDocumentMethodAttribute, SoapRpcMethodAttribute and XmlElementAttribute provide additional information on the derived method which is required for the HTTP protocol.

asyncState is passed into callback and is included in the IAsyncResult that is returned from BeginInvoke. It is useful for passing information from the context of the asynchronous call to the handling of the asynchronous result in callback.

Requirements

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

See Also

HttpSimpleClientProtocol Class | HttpSimpleClientProtocol Members | System.Web.Services.Protocols Namespace | IAsyncResult

Show: