views:

160

answers:

1

Hello people,

I am really confused right now and I can't get any right answers anywhere.

My confusions are:

1) Isn't wsHttpBinging (which is beefed up basicHttpBinding) used in SOAP instead of REST and REST only uses webHttpBinding?

2) Also, DOES silverlight 4 with WCF (REST) support wsHttpBinding (VS2010)? I read that it does not everywhere on the net but I some how got silverlight 4 working with REST using wsHttpBinding. NOTE: I am using Factory="System.ServiceModel.Activation.WebServiceHostFactory". Is this factory setting somehow bypassing my web.config setting for wsHttpBinding to make it work with webHttpBinding and i am thinking by my wsHttpBinding is working?

Thank you.

+2  A: 

WCF uses SOAP by default - all binding except the webHttpBinding use SOAP.

If you want to do REST, you need to use the webHttpBinding.

1) Isn't wsHttpBinging (which is beefed up basicHttpBinding) used in SOAP instead of REST and REST only uses webHttpBinding?

Yes - wsHttpBinding is a SOAP-based protocol - webHttpBinding is REST

2) Also, DOES silverlight 4 with WCF (REST) support wsHttpBinding (VS2010)?

Silverlight 4 supports basicHttpBinding (SOAP), netTcpBinding (new in SL4 - SOAP) and webHttpBinding (REST).

NOTE: I am using Factory="System.ServiceModel.Activation.WebServiceHostFactory". Is this factory setting somehow bypassing my web.config setting for wsHttpBinding to make it work with webHttpBinding and i am thinking by my wsHttpBinding is working?

Yes, if you use the WebServiceHostFactory in your SVC file, then you're really getting the webHttpBinding (REST) implicitly. The WCF runtime will not look at your web.config for infos - it has all the information and settings it needs when you use WebServiceHostFactory - and you get webHttpBinding.

marc_s