In my opinion, it is arguable if WCF is the best stack where to add great HTTP support. However, one of the advantages of this choice might be the integration with other WCF-able technologies, namely AppFabric Service Bus.
I've tried and succeed to expose a simple WCF HTTP service on the Service Bus, however I've found some roadblocks:
1) The WebHttpServiceHost
does not allow the explicit addition of service endpoints (via addServiceEndpoint), because of the way it creates the default endpoints (explicitly obtaining the operation contract).
2) In order to expose on the Service Bus, I have to use a custom binding composed by:
a) The WCF HTTP HttpMessageEncodingBindingElement, since the upper service model components expect a
HttpMessage and not a regular Message.
b) The HttpRelayTransportBindingElement, so the service is exposed remotely on the service bus.
However, the HttpMessageEncodingBindingElement
class is internal.
3) The Service Bus transport channel expects the message to behave as a regular
Message instance, namely is expects the OnGetReaderAtBodyContents
method to behave correctly. However, in HttpMessage, this method throws a NotSupportedException.