WCF Service instead of ASMX Web Service?

被刻印的时光 ゝ 提交于 2019-12-22 05:23:39

问题


I'm writing a SOAP Server that will act as an endpoint for an external client. The external client expects SOAP 1.1. I'll be taking embedded business objects in the SOAP messages and passing them to an internal application, getting responses back and responding with SOAP messages to the eternal client.

I did the traditional ASMX based web services several years ago. Now, I've been exploring WCF Services and wondering the best approach to take.

1) Should WCF be considered a superset of ASMX web services?

2) Is there any reason to still write new web services using ASMX instead of WCF?

3) Does WCF provide better facilities for working with SOAP messages, as opposed to SOAP Extensions?

4) Can I restrict communication to SOAP 1.1 using WCF, the way I can with a web.config change in ASMX?

5) Does WCF have an easy way to log or review the requests that hit the service without resorting to something like SOAP extensions?

Sorry my questions are not very specific; still trying to get handle on what I need to know...

Using VS2008, Windows Server 2008.

Chris


回答1:


I would recommend that you use WCF. If you configure your WCF service to use basichttpbinding, it will work as a SOAP 1.1 service.

  1. WCF "replaces" several communication technologies, including asmx.
  2. I cannot think of any technical reason. You may do it if you have a team that knows asmx but not wcf, or you have a project with a lot of asmx services and you do not want to introduce a new technology.
  3. WCF has message contracts, but not 100% sure what you mean here.
  4. Yes, basic http binding
  5. Yes, you can use WCF tracing


来源:https://stackoverflow.com/questions/2841221/wcf-service-instead-of-asmx-web-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!