tags:

views:

468

answers:

2

I need to upgrade our web services to use WCF instead of ASMX. If the signatures of the web services stays the same, will existing clients that already call the ASMX service have to change anything on their end? Is there anyway to still use WCF but not force them to change anything?

+2  A: 

Option 1 :

  1. Using the current ASMX's WSDL, generate the client using svcutil.exe
  2. Grab the generated interface and create a WCF service based on this interface

    Output : One new WCF endpoint configured with basicHttpBinding. Clients need to update the URL at which they're sending the messages.

Option 2 :

  1. Refactor your ASMX code. Move all the logic into a separate DLL.
  2. Create a WCF service and use the logic in the refactored DLL.

    Output : 2 endpoints, one for ASMX and another one for WCF

+1  A: 

If you use the BasicHttpBinding for your new WCF service, and implement the same methods with the same message structure, existing callers should be able to call into this new WCF service without any chance on their part.

There's also an AspNetCompatibilityRequirements attribute in order to get around some potential compatibility issue - see the MSDN documentation on it.

Marc

marc_s