WCF using REST having some required questions

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

My bewilderment:

1) Isn't wsHttpBinging (which is fortified with basicHttpBinding) used in SOAP instead of REST, while REST only uses webHttpBinding?

2) Also DOES silverlight 4 with WCF (REST) ​​support wsHttpBinding (VS2010)? I've read that this isn't everywhere on the net, but I somehow got silverlight 4 working with REST using wsHttpBinding. NOTE. I am using Factory = "System.ServiceModel.Activation.WebServiceHostFactory". This factory setting somehow bypasses my web.config setting for wsHttpBinding to make it work with webHttpBinding and I think my wsHttpBinding is working?

Thanks.

+2


a source to share


1 answer


WCF uses SOAP by default - all bindings except webHttpBinding use SOAP.

If you want to do REST you need to use webHttpBinding

.

1) Is it not wsHttpBinging (which is fortified with basicHttpBinding) used in SOAP instead of REST and REST uses webHttpBinding?

Yes - wsHttpBinding

- SOAP based protocol - webHttpBinding

- REST



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

Silverlight 4 supports basicHttpBinding

(SOAP), netTcpBinding

(new in SL4 is 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 work with webHttpBinding, and I think my wsHttpBinding works?

Yes, if you use WebServiceHostFactory

in your SVC file, then you do get webHttpBinding

(REST) ​​implicitly. The WCF runtime won't look at your web.config for information - it has all the information and settings you need when using the WebServiceHostFactory - and you get webHttpBinding

.

+2


a source







All Articles