1

We have Web Service proxy which has asynchronous method based on Event-based Asynchronous Pattern. But the client code we are making call to web-service is asynchronous but implemented with Asynchronous Programming Model (APM) and it expects Web methods to return IAsyncResult.

How we can do that?

1 Answers1

0

Server and client are independent in the sense that neither can tell what kind of synchronous or asynchronous programming model the other uses.

You can use any style on the client that you want. Probably, that should be the TAP pattern nowadays. The server does not need to know, nor can it find out if it wanted to.

Community
  • 1
  • 1
usr
  • 168,620
  • 35
  • 240
  • 369
  • We have Web Service proxy (C# file) which has asynchronous method based on Event-based Asynchronous Pattern (MethodNameAsync method and a corresponding MethodNameCompleted event). And the place from we need to make call to wevservice expects Web methods to return IAsyncResult (BeginMethodName/EndMethodName). – user2926764 May 26 '15 at 17:00
  • Also what is implemented in server is not matter. Also we cant use TAP here. – user2926764 May 26 '15 at 17:08
  • Why can't you just regenerate those proxy *.cs files to also have the APM pattern? – usr May 26 '15 at 18:52