By default when you call a Web service method, the HTTP connection is held open until the WebMethod returns its value to the caller. In certain circumstances, where you may need to call a long running WebMethod where there is no return value it is appropriate to start the method processing and immediately return to the caller in a style similar to a "fire-and-forget" process.
By decorating the WebMethod with the attrbute
The disadvantage of this technique is that the consumer does not get any idea whether the method completed successfully or there were errors.
Note: By default, SOAP messages are in "document" style of formatting. If you are using Remote Procedure Call (RPC) formatting then use [SoapRpcMethod(OneWay=true)] instead of [SoapDocumentMethod(OneWay=true)].
No comments:
Post a Comment