title: Web services and client DLL
body: <p>I have a web service and a client DLL. The web service uses an Oracle database. </p>
  
  <p>For testing the client DLL, I copied the web service and made it point to a test database. Then I copied the client DLL and added this test web service using "Add web reference". </p>
  
  <p>What I would like to do is to use one web service and one client DLL but be able to tell the client DLL to use either use the test or production database rather than two identical web serivces and client DLLs.</p>
  
  <h2>Edit</h2>
  
  <p>I mis-stated the issue. What I need to do is use one client DLL and two web services (one production version, one development/test version) and be able to, somehow, tell the client DLL which web services to use.
  This is a sample of how the web service, client DLL and client app are used:</p>
  
  <pre><code>public class DSSService : System.Web.Services.WebService
  {
      public DSSService()
      {
  
      }
      [WebMethod(MessageName = "GetFacility", BufferResponse=true, Description = "blah.")]
  
      public Facility GetFacility(string sFDBID, string sZip, string sFinNo)
      {
          Facility oFacility = ...;
          ...
          return oFacility;
      }
      ....
  }
  </code></pre>
  
  <p>Client DLL:</p>
  
  <pre><code>namespace DSSConfig
  {
      string sWSURL;
  
      public class Config
      {
          public Config()
          {
          }
  
          public void SetWSURL(string sURL)
          {
              sWSURL = sURL;
          }
  
          public Facility GetFacility(string sFDBID, string sZip, string sFinNo)
          {
              DSSService Proxy = new DSSService();
              proxy.Url = sWSURL;
              Facility oFacility = Proxy.GetFacility(sFDBID, sZip, sFinNo);
              return  oFacility;
          }
  </code></pre>
  
  <p>In client application, having DSSConfig DLL as reference:</p>
  
  <pre><code>DSSConfig oConfig = new DSSConfig();
  oConfig.SetWSURL("http://myserver/WebService1/service.asmx");
  oConfig.GetFacility("blah", "blah", "blah");
  </code></pre>