title: WCF service returning another service (service factory?)
body: <p>We are using WCF for communication between a client and a server application. The client application has many features that requires communication to the server - and we have chosen to implement this in multiple classes (seperation of responsability)</p>
  
  <p>For the time, we are creating new WCF endpoints and service contracts for each object - Invoicing, Accounting, Content Management, etc. This causes a lot of endpoint configuration both on the client and server (with potential misconfiguration problems when moving into the test and production platforms).</p>
  
  <p>I would like to know if I can define a single WCF endpoint that can deliver multiple service contact implementations. Our configuration files would then contain a single endpoint (to the service factory) and I can request different services by specifying the interface of the service I am interested in.</p>
  
  <p>e.g.</p>
  
  <pre><code>using (IServiceClientFactory serviceClientFactory = new RealProxyServiceClientFactory())
              {
                  // This is normal WCF proxy object creation.
                  IServiceFactory serviceFactory = serviceClientFactory.CreateInstance&lt;IServiceFactory&gt;("");
  
                  // This is what we would like to do
                  IInvoiceService invoiceService = serviceFactory.getService(typeof(IInvoiceService));
  
                  invoiceService.executeOperation(data);
              }
  </code></pre>
  
  <p>The clue being a single endpoint configuration per client/server pair, instead of an endpoint configuration per service contact I would like to make available.</p>
  
  <p>Is this possible?</p>