I have created a service that communicates with the SalesForce platform via C#, using their WSDL. It so happens that SalesForce (rather logically) allows for "sandbox" instances of its platform and "production" instances of its platform. My application is designed to work with production, but I have been using the sandbox to integration test and unit test. I am now reaching the point where I need to deploy to production. However, I face a large problem in that if I ever need to build and test new features, I will have to update the WSDL from the production instance to the sandbox instance, then swap back and forth as I add new features. This is because the two WSDLs are entirely different and I have to generate code from them! This is not only sloppy, it's dangerous. I could affect some of my live system data.
I would like to find a way to use a registry key, a text value, or some configuration setting that tells my application which WSDL to use. Trouble is? I can't figure out how one could approach that. The very objects my code is referencing are generated from that WSDL. Any ideas?
See Question&Answers more detail:os