How Do I: Return Information to a Client Using a Callback?
You can use a callback to return information to a client asynchronously. When you invoke the callback, your web service sends a message back to the client.
Using callbacks assumes that the client software implements its own code for receiving the callback message you send. If the client does not support receiving callbacks, an alternative is to use polling, as described in Using Polling as an Alternative to Callbacks.
To Add a Callback
In Design View, select your web service.
From the Add Operation drop-down list, select Add Callback.
Double-click the arrow corresponding to the callback. The Edit Maps and Interface dialog appears.
Change the name of your callback and its arguments to include the information that you wish to send to the client.
Click OK.
To invoke the callback in your web service, you can write code such as the following:
callback.name(arg1, arg2);
Replace name with the name of your callback, passing it the arguments that match the types you entered in the Edit Maps and Interface dialog.
Edit Maps and Interface Dialog