Starts an asynchronous invocation of a method of a HTTP web service.
[Visual Basic] Protected Function BeginInvoke( _ ByVal methodName As String, _ ByVal url As String, _ ByVal parameters() As Object, _ ByVal callback As AsyncCallback, _ ByVal asyncState As Object _ ) As IAsyncResult [C#] protected IAsyncResult BeginInvoke( string methodName, string url, object[] parameters, AsyncCallback callback, object asyncState ); [C++] protected: IAsyncResult* BeginInvoke( String* methodName, String* url, Object* parameters[], AsyncCallback* callback, Object* asyncState ); [JScript] protected function BeginInvoke( methodName : String, url : String, parameters : Object[], callback : AsyncCallback, asyncState : Object ) : IAsyncResult;
An IAsyncResult which can be passes to EndInvoke to obtain the return values from the remote method call.
Exception Type | Condition |
---|---|
Exception | The request reached the server machine, but was not processed successfully. |
The methodName 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. HttpMethodAttribute, System.Web.Services.Protocols.HttpParameterAttribute, and System.Web.Services.Protocols.HttpReturnAttribute 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.
HttpClientProtocol Class | HttpClientProtocol Members | System.Web.Services.Protocols Namespace | IAsyncResult