views:

4234

answers:

4
  1. 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?

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

  3. Are there any really good examples of how to get started with WCF that show the benefits of it over soap?

EDIT

+12  A: 
  1. 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.

  2. Other languages can communicate with the web protocols. Binary, not so much...

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

Corbin March
+2  A: 

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

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


Marc Bollinger
+2  A: 

This may help to explain a few differences and why you would want to use WCF. Also, in the next few years WCF is going to be a major way we do a lot of things with the .Net platform (live services, rest, azure, oslo, dublin, etc).

Article: WCF vs ASMX

Keith Elder
Including the http://keithelder.net/blog/images/keithelder_net/blog/WindowsLiveWriter/WCFvsASMXWebServices_ABC2/image_thumb_2.png image in this reply would be great
Chris S
A: 

Based on this MSDN article that is linked in the question, WCF supports more than just SOAP. It has support for:

  • BasicHttpBinding
    Interoperability with Web services and clients supporting the WS-BasicProfile 1.1 and Basic Security Profile 1.0.

  • WSHttpBinding
    Interoperability with Web services and clients that support the WS-* protocols over HTTP.

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

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

  • NetTcpBinding
    Secure, reliable, high-performance communication between WCF software entities across a network.

  • NetNamedPipeBinding
    Secure, reliable, high-performance communication between WCF software entities on the same machine.

  • NetMsmqBinding
    Communication between WCF software entities by using MSMQ.

  • MsmqIntegrationBinding
    Communication between a WCF software entity and another software entity by using MSMQ.

  • NetPeerTcpBinding
    Communication between WCF software entities by using Windows Peer-to-Peer Networking.

Chris S