WCF服务而不是ASMX Web服务? [英] WCF Service instead of ASMX Web Service?

查看:113
本文介绍了WCF服务而不是ASMX Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个SOAP服务器,它将充当外部客户端的端点.外部客户端希望使用SOAP 1.1.我将在SOAP消息中获取嵌入式业务对象,并将其传递给内部应用程序,获取响应并以SOAP消息响应给永恒的客户端.

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.

几年前,我做了传统的基于ASMX的Web服务.现在,我一直在探索WCF服务,并想知道采用哪种最佳方法.

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)WCF是否应被视为ASMX Web服务的超集?

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

2)是否有任何理由仍然使用ASMX而不是WCF编写新的Web服务?

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

3)与SOAP扩展相比,WCF是否提供了更好的工具来处理SOAP消息?

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

4)是否可以像使用ASMX中的web.config更改那样,限制使用WCF与SOAP 1.1进行通信?

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

5)WCF是否有一种简便的方法来记录或查看命中该服务的请求,而无需借助SOAP扩展之类的东西?

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...

使用VS2008,Windows Server 2008.

Using VS2008, Windows Server 2008.

克里斯

推荐答案

我建议您使用WCF.如果将WCF服务配置为使用basichttpbinding,它将用作SOAP 1.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取代"了多种通信技术,包括asmx.
  2. 我想不出任何技术原因.如果您有一个了解asmx但不了解wcf的团队,或者您的项目中有很多asmx服务,并且不想引入新技术,则可以这样做.
  3. WCF具有消息合同,但不是100%确定是什么你的意思是这里.
  4. 是的,基本的http绑定
  5. 是的,您可以使用 WCF跟踪
  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

这篇关于WCF服务而不是ASMX Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆