wcf supports REST using which binding? [Resolved]

Posted by Udaysimha under WCF on 1/23/2012 | Points: 10 | Views : 2799 | Status : [Member] | Replies : 3
Hi All,
please let me know about wcf supports REST using which binding.
Thanks

uday


Responses

Posted by: Hemanthlaxmi on: 1/23/2012 [Member] Starter | Points: 50

Up
0
Down

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


If this helps you .
Please "Mark as Answer"

Udaysimha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Udaysimha on: 1/23/2012 [Member] Starter | Points: 25

Up
0
Down
thanks you so much

uday

Udaysimha, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hemanthlaxmi on: 1/23/2012 [Member] Starter | Points: 25

Up
0
Down
you are welcome.

If this helps you .
Please "Mark as Answer"

Udaysimha, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response