Asynchronous web service
Hi,
I have two questions on asynchronous web services.
1)If I call the BeginXXX functions that are generated by WSDL.exe, am I just doing asynchronous web service in the client side, not the server side?
2)If the web service method does not return any value, should I only call BeginXXX and not the EndXXX? I'm only throwing some trivial logging information and it's not important to get any values back.
Thank you.
[478 byte] By [
nostra49] at [2007-12-16]
1) Yes. by calling the wsdl generated async functions, you async is limited to client side only. Refer to documentation for samples which implement async on the server side.
2) Ideally OneWay method is best suited for a scenario where webservice does not return a value. But, if you want to implement async anyways, its not requirement to call EndXXX method. But, you have to wait on IAsyncResult.IsCompleted to know if the method has finished or not. You should make sure that BeginXXX has finished before exiting the routine.
thx,
vineel