Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

basicHttpBinding vs wsHttpBinding [duplicate]

In a WCF endpoint, what is the difference between basicHttpBinding and wsHttpBinding? When should each be used?

like image 209
Craig Schwarze Avatar asked Jan 21 '10 03:01

Craig Schwarze


People also ask

What is the difference between BasicHttpBinding and WsHttpBinding?

Primarily BasicHttpBinding is designed to exchange SOAP over HTTP(s) only, just like old ASMX or . net web services and supports the WS-I BasicProfile. WsHttpBinding supports the advanced WS-* specification which includes WS-Addressing and WS-Security etc.

What is a BasicHttpBinding?

BasicHttpBinding is suitable for communicating with ASP.NET Web Service (ASMX) based services that conform to the WS-Basic Profile that conforms with Web Services. This binding uses HTTP as the transport and text/XML as the default message encoding. Security is disabled by default.

What is WS in WsHttpBinding?

"Ws" is an abbreviation for "Web Services". This all play well with the fact that WsHttpBinding is the binding the use (instead of BasicHttpBinding ) when operatibility is less important, but security is more important. See this answer for great information about the two.


2 Answers

Ton of material on that out there - just google for "WCF basicHttpBinding wsHttpBinding".

You'll find amongst others:

  • WCF : BasicHttpBinding compared to WSHttpBinding at SOAP packet level.
  • Difference between BasicHttpBinding and WsHttpBinding and many, many more!

Very basically:

  • basicHttp is SOAP 1.1, wsHttp is SOAP 1.2 (they're quite different, esp. when it comes to SOAP faults)
  • basic is - very basic. It's compatible with old-style ASMX ASP.NET webservices and just about any other web service stack out there
  • basic is very limited in its security settings
  • wsHttp is an implementation of a gazillion WS-* standards, and offers much more features: security, reliable messaging, transaction support, duplex communications and a whole host more.
  • wsHttp is the much "heavier" and more extensive protocol, less compatible, less nimble
like image 155
marc_s Avatar answered Sep 22 '22 21:09

marc_s


wsHttpBinding is more secure and reliable than basicHttpBinding. If great compatibility is not required, wsHttpBinding is the choice.

Ref: BasicHttpBinding vs WSHttpBinding

BasicHttpBinding:

  1. WS-I Basic Profile 1.1 specification (Old ASMX style)
  2. It supports SOAP 1.1 as a messaging protocol
  3. Doesn’t support WS-Security, and the entire payload is sent in plain text.
  4. Offers great level of interoperability.

WSHttpBinding:

  1. Allows you to use various WS-* specifications such as WS-Security 1.1, WS-Reliable Messaging etc
  2. It supports SOAP 1.2 as a messaging protocol
  3. As its built using WS-* specifications, it does not support wider ranges of client.
like image 23
mahesh Avatar answered Sep 23 '22 21:09

mahesh