title: Config for WCF with multiple endpoints
body: <p>I'm new to WCF and am trying to get some ideas I have off the ground.</p>
  
  <p>Basically I have a web WCF Application project with the following in its web.config:</p>
  
  <pre><code>&lt;system.serviceModel&gt;
      &lt;services&gt;
          &lt;service name="WcfService1.ServiceContract.IDirectorySearchService" behaviorConfiguration="defaultServiceBehavior"&gt; 
              &lt;endpoint name="restxml" address="xml" binding="webHttpBinding" contract="WcfService1.ServiceContract.IDirectorySearchServiceXml" behaviorConfiguration="xmlRestBehavior"/&gt;
              &lt;endpoint name="restjson" address="json" binding="webHttpBinding" contract="WcfService1.ServiceContract.IDirectorySearchServiceJson" behaviorConfiguration="jsonRestBehavior"/&gt;
              &lt;endpoint name="soap" address="soap" binding="basicHttpBinding" contract="WcfService1.ServiceContract.IDirectorySearchService"/&gt;
              &lt;endpoint name="mex" address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/&gt;
          &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
          &lt;serviceBehaviors&gt;
              &lt;behavior name="defaultServiceBehavior"&gt; 
                  &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
              &lt;/behavior&gt;
          &lt;/serviceBehaviors&gt;
          &lt;endpointBehaviors&gt;
              &lt;behavior name="xmlRestBehavior"&gt;
                  &lt;webHttp/&gt;
              &lt;/behavior&gt;
              &lt;behavior name="jsonRestBehavior"&gt;
                  &lt;enableWebScript/&gt;
              &lt;/behavior&gt;
          &lt;/endpointBehaviors&gt;
      &lt;/behaviors&gt;
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>My interfaces look like this:</p>
  
  <pre><code>[ServiceContract]
  public interface IDirectorySearchServiceXml  
  {
      [OperationContract]
      [WebGet(UriTemplate = "Search/")]
      SearchResults Search();
  }
  
  [ServiceContract]
  public interface IDirectorySearchServiceJson  
  { 
      [OperationContract]
      [WebGet(UriTemplate = "Search/")]
      SearchResults Search();
  }
  
  [ServiceContract]
  public interface IDirectorySearchService
  {
      [OperationContract]
      SearchResults Search(int? sportId, int? instituteId, DateTime? startDate, DateTime? endDate);
  }
  </code></pre>
  
  <p>Now the part I am having a little trouble with is what else I need to get this up and running... Like given this what .svc files do I need and do I have the config right... Also what addresses do I need to use to get this running either through the browser or through the WCF test client. Note I am currently using 3.5.</p>
  
  <p>Cheers
  Anthony</p>
  
  <p>UPDATE:</p>
  
  <p>So If I have something like the following, I would need 3 different svc files... If this is the case then there isn't much point in having address part in the end point...</p>
  
  <pre><code>public class DirectorySearchServiceXml : IDirectorySearchServiceXml  
  {
      ...
  }
  
  public class DirectorySearchServiceJson : IDirectorySearchServiceJson  
  { 
      ...
  }
  
  public class DirectorySearchService : IDirectorySearchService
  {
      ...
  }
  </code></pre>
  
  <p>But I could create 1 class that exsplictly implments all 3 interfaces, then I would only have 1 svc and then the address becomes relevent... Is that correct?</p>