views:

438

answers:

3

Hi All,

I want to clear my doubts about some questions related to web services and WCF. Following are my doubts..

  1. What is the message format in Web Services , like in WCF every message is a SOAP message?
  2. Can we use TCP/IP protocol in Web Services if not then why not ?
  3. Why we use DataContractSerializer in WCF while we already had XMLSerializer,SOAP Serializer,BinarySerializer in .Net Framework?
  4. When i create a wcf service and define endpoints even when i don't add IMetadaExchange endpoint, i just add service behavior and say httpGetEnabled = true, why it's possible to create a proxy class by using AddServiceReference , i mean how can someone access my service details untill i don't expose mex endpoint.

Please help me out in clearing my doubts in above questions.

+1  A: 

WCF is an umbrella technology that covers a lot of communication topics. WCF can used to communicate with Web Services, with other WCF applications, with MSMQ applications and more. You can replace the endpoints used to switch from a SOAP based HTTP channel to a binary TCP based one. Even more, you can do this at deployment time, changing only the .config file (some restrictions apply).

So some specific answers:

  1. WCF can use SOAP messages
  2. WebServices were always TCP/IP. HTTP is TCP/IP.
  3. DataContractSerializer provides versioning. The most important thing in distributed apps.
  4. I'll let some WCF expert answer that.
Remus Rusanu
A: 

A good link for this is here

This would explain the differences between the two.

HotTester