-
We currently just utilize soap webservices for all our communication but have been thinking about moving to WCF instead. What are the benefits of using it over an asmx service?
我们目前只是使用soap webservices进行所有的通信,但一直在考虑转向WCF。与asmx服务相比,使用它有什么好处?
-
If we do go with a WCF service, can other languages still communicate with it? SOAP is standardized and all languages can interact with it.
如果我们使用WCF服务,其他语言还能与它通信吗?SOAP是标准化的,所有语言都可以与之交互。
-
Are there any really good examples of how to get started with WCF that show the benefits of it over soap?
有什么好的例子可以说明如何开始使用WCF,它比soap更有好处吗?
EDIT
编辑
- I just found this question which is quite helpful.
- 我发现这个问题很有帮助。
- The Getting Started Tutorial is great.
- 入门教程非常棒。
3 个解决方案
#1
15
-
There's a bit of a learning curve with WCF, but once you learn it it's no harder to implement than an asmx web services. One advantage is you can easily switch protocols and serialization from binary remoting all the way to web protocols. It's also easy to host either in IIS or out.
WCF有一点学习曲线,但是一旦你学会了它,实现起来就不会比asmx web服务难了。一个好处是,您可以轻松地将协议和串行化从二进制远程转换到web协议。在IIS或out中托管也很容易。
-
Other languages can communicate with the web protocols. Binary, not so much...
其他语言可以与web协议通信。二进制,与其说……
-
I just dug into the Getting Started Tutorial. It does a good job of showing the relative ease-of-use. From there, take a look at Hosting and more detailed Features.
我刚刚开始学习入门教程。它在显示相对使用方便方面做得很好。从那里,看看托管和更详细的特性。
#2
4
WCF is not a replacement for SOAP, and indeed, SOAP can be used as the serialization format between endpoints for communication. SOAP the standard also doesn't really define what goes in the message body, so in the case of WCF-to-WCF communication, a SOAP envelope is used, but the content is binary, so there's your primary advantage, at least in terms of performance. Another advantage is that the programming model of WCF is, or at least is intended to be, much more straightforward; especially since it sounds like you're really just using Web Services to communicate internally. In this case, most of the work would be up front, configuring endpoints (though consuming asmx WSDLs is obviously very easy in .NET).
WCF不是SOAP的替代品,实际上,SOAP可以用作通信端点之间的序列化格式。SOAP标准也没有真正定义消息主体中的内容,所以对于WCF-to-WCF通信,使用的是SOAP信封,但是内容是二进制的,所以至少在性能方面有您的主要优势。另一个优点是,WCF的编程模型更简单,或者至少是更简单;特别是因为听起来您实际上只是在使用Web服务进行内部通信。在这种情况下,大部分工作将放在前面,配置端点(尽管在. net中使用asmx wsdl显然非常容易)。
I'm no expert in WCF, but what I do know has been from .NET user group presentations by Juval Lowy (who wrote the O'Reilly WCF book), his site has a decent amount of information in the way of screencasts and samples in the Resources section, in addition to the Microsoft sites (have you checked Channel9?).
在WCF我不是专家,但我知道从。net用户组演示了居佛罗伊(O ' reilly WCF的书谁写的),他的网站有一个像样的信息量的视频和在参考资料部分样品,除了微软网站(你检查Channel9吗?)。
#3
4
Based on this MSDN article that is linked in the question, WCF supports more than just SOAP. It has support for:
基于问题中链接的MSDN文章,WCF支持的不仅仅是SOAP。它支持:
-
BasicHttpBinding
Interoperability with Web services and clients supporting the WS-BasicProfile 1.1 and Basic Security Profile 1.0.BasicHttpBinding与支持WS-BasicProfile 1.1和基本安全概要1.0的Web服务和客户机的互操作性。
-
WSHttpBinding
Interoperability with Web services and clients that support the WS-* protocols over HTTP.WSHttpBinding与Web服务和通过HTTP支持WS-*协议的客户端互操作。
-
WSDualHttpBinding
Duplex HTTP communication, by which the receiver of an initial message does not reply directly to the initial sender, but may transmit any number of responses over a period of time by using HTTP in conformity with WS-* protocols.WSDualHttpBinding双工HTTP通信,初始消息的接收方不会直接回复初始发送方,但是可以通过使用HTTP与WS-*协议在一段时间内传输任意数量的响应。
-
WSFederationBinding
HTTP communication, in which access to the resources of a service can be controlled based on credentials issued by an explicitly-identified credential provider.WSFederationBinding HTTP通信,其中对服务资源的访问可以基于一个明确标识的凭据提供程序发出的凭据进行控制。
-
NetTcpBinding
Secure, reliable, high-performance communication between WCF software entities across a network.在跨网络的WCF软件实体之间的安全、可靠、高性能通信。
-
NetNamedPipeBinding
Secure, reliable, high-performance communication between WCF software entities on the same machine.在同一台机器上,WCF软件实体之间的NetNamedPipeBinding安全、可靠、高性能通信。
-
NetMsmqBinding
Communication between WCF software entities by using MSMQ.使用MSMQ在WCF软件实体之间进行NetMsmqBinding通信。
-
MsmqIntegrationBinding
Communication between a WCF software entity and another software entity by using MSMQ.使用MSMQ在WCF软件实体和另一个软件实体之间进行MsmqIntegrationBinding通信。
-
NetPeerTcpBinding
Communication between WCF software entities by using Windows Peer-to-Peer Networking.使用Windows对等网络在WCF软件实体之间进行NetPeerTcpBinding通信。
#1
15
-
There's a bit of a learning curve with WCF, but once you learn it it's no harder to implement than an asmx web services. One advantage is you can easily switch protocols and serialization from binary remoting all the way to web protocols. It's also easy to host either in IIS or out.
WCF有一点学习曲线,但是一旦你学会了它,实现起来就不会比asmx web服务难了。一个好处是,您可以轻松地将协议和串行化从二进制远程转换到web协议。在IIS或out中托管也很容易。
-
Other languages can communicate with the web protocols. Binary, not so much...
其他语言可以与web协议通信。二进制,与其说……
-
I just dug into the Getting Started Tutorial. It does a good job of showing the relative ease-of-use. From there, take a look at Hosting and more detailed Features.
我刚刚开始学习入门教程。它在显示相对使用方便方面做得很好。从那里,看看托管和更详细的特性。
#2
4
WCF is not a replacement for SOAP, and indeed, SOAP can be used as the serialization format between endpoints for communication. SOAP the standard also doesn't really define what goes in the message body, so in the case of WCF-to-WCF communication, a SOAP envelope is used, but the content is binary, so there's your primary advantage, at least in terms of performance. Another advantage is that the programming model of WCF is, or at least is intended to be, much more straightforward; especially since it sounds like you're really just using Web Services to communicate internally. In this case, most of the work would be up front, configuring endpoints (though consuming asmx WSDLs is obviously very easy in .NET).
WCF不是SOAP的替代品,实际上,SOAP可以用作通信端点之间的序列化格式。SOAP标准也没有真正定义消息主体中的内容,所以对于WCF-to-WCF通信,使用的是SOAP信封,但是内容是二进制的,所以至少在性能方面有您的主要优势。另一个优点是,WCF的编程模型更简单,或者至少是更简单;特别是因为听起来您实际上只是在使用Web服务进行内部通信。在这种情况下,大部分工作将放在前面,配置端点(尽管在. net中使用asmx wsdl显然非常容易)。
I'm no expert in WCF, but what I do know has been from .NET user group presentations by Juval Lowy (who wrote the O'Reilly WCF book), his site has a decent amount of information in the way of screencasts and samples in the Resources section, in addition to the Microsoft sites (have you checked Channel9?).
在WCF我不是专家,但我知道从。net用户组演示了居佛罗伊(O ' reilly WCF的书谁写的),他的网站有一个像样的信息量的视频和在参考资料部分样品,除了微软网站(你检查Channel9吗?)。
#3
4
Based on this MSDN article that is linked in the question, WCF supports more than just SOAP. It has support for:
基于问题中链接的MSDN文章,WCF支持的不仅仅是SOAP。它支持:
-
BasicHttpBinding
Interoperability with Web services and clients supporting the WS-BasicProfile 1.1 and Basic Security Profile 1.0.BasicHttpBinding与支持WS-BasicProfile 1.1和基本安全概要1.0的Web服务和客户机的互操作性。
-
WSHttpBinding
Interoperability with Web services and clients that support the WS-* protocols over HTTP.WSHttpBinding与Web服务和通过HTTP支持WS-*协议的客户端互操作。
-
WSDualHttpBinding
Duplex HTTP communication, by which the receiver of an initial message does not reply directly to the initial sender, but may transmit any number of responses over a period of time by using HTTP in conformity with WS-* protocols.WSDualHttpBinding双工HTTP通信,初始消息的接收方不会直接回复初始发送方,但是可以通过使用HTTP与WS-*协议在一段时间内传输任意数量的响应。
-
WSFederationBinding
HTTP communication, in which access to the resources of a service can be controlled based on credentials issued by an explicitly-identified credential provider.WSFederationBinding HTTP通信,其中对服务资源的访问可以基于一个明确标识的凭据提供程序发出的凭据进行控制。
-
NetTcpBinding
Secure, reliable, high-performance communication between WCF software entities across a network.在跨网络的WCF软件实体之间的安全、可靠、高性能通信。
-
NetNamedPipeBinding
Secure, reliable, high-performance communication between WCF software entities on the same machine.在同一台机器上,WCF软件实体之间的NetNamedPipeBinding安全、可靠、高性能通信。
-
NetMsmqBinding
Communication between WCF software entities by using MSMQ.使用MSMQ在WCF软件实体之间进行NetMsmqBinding通信。
-
MsmqIntegrationBinding
Communication between a WCF software entity and another software entity by using MSMQ.使用MSMQ在WCF软件实体和另一个软件实体之间进行MsmqIntegrationBinding通信。
-
NetPeerTcpBinding
Communication between WCF software entities by using Windows Peer-to-Peer Networking.使用Windows对等网络在WCF软件实体之间进行NetPeerTcpBinding通信。