title: Make a single WCF service support both SOAP, REST and WSDL
body: <p>I'm trying to build a C# service in .NET 3.5 that supports both SOAP - and shows the WSDL - and REST.</p>
  
  <p>The SOAP service and WSDL generation was easy enough to do using the <code>ServiceHost</code> and a <code>BasicHttpBinding</code> classes.  Got that working and the client was happy.</p>
  
  <p>Because the SOAP calls all used simple parameters, the client developers requested a REST interface for some of the commands.  So I changed the ServiceHost class to a <code>WebServiceHost</code>, added necessary <code>WebInvoke</code> and <code>WebGet</code> attributes, added a <code>WebHttpBinding</code> class, and bingo - REST and SOAP were both working out of one service.  Way cool, change one interface and both REST and SOAP got the new stuff.</p>
  
  <p>But one problem - the WSDL no longer gets generated.  I couldn't browse to <a href="http://server/service?wsdl" rel="noreferrer">http://server/service?wsdl</a> and get the WSDL file.  Checking the MSDN docs, that appears to be behavior for a default <code>WebServiceHost</code>.</p>
  
  <p>Question: can I override this behavior so that the WSDL could be obtained?  Doesn't have to the same URL as before - it can change - but I just need to have some URL into service to get the WSDL for those SOAP developers.</p>