Converting ASMX to WCF Web Service

前端 未结 2 369
南旧
南旧 2021-02-02 18:31

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 ha

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-02 18:54

    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

提交回复
热议问题