A web service proxy usually has a Begin and End method. You can use them. The example below shows how you can call the begin method and use the callback to end the call. A call to MakeWebServiceAsynCall will immediately return. The using statement ensures that the object will be deleted safely.
void MakeWebServiceAsynCall() { WebServiceProxy proxy = new WebServiceProxy(); proxy.BeginHelloWorld(OnCompleted, proxy); } void OnCompleted(IAsyncResult result) { try { using (WebServiceProxy proxy = (WebServiceProxy)result.AsyncState) proxy.EndHelloWorld(result); } catch (Exception ex) {
If you need to know if the call was successful or not, you will need to wait for the result.
Tim carter
source share