We are consuming an external WSDL in our app layer using a Service Reference. Its actually the PayPal WSDL.
They have a test (sandbox) WSDL url and a live production WSDL url. They both have the same definition but with different wsdl locations and different endpoints. So how does one handle this in their code?
We are basically trying to figure out how we can eliminate duplicate clasess/methods but be able to easily run the code for either the sanbox or live site using some config app keys or something. Not sure what that all entails.
Do I need both of them as Service References? If so, we can't include both in the same class file, otherwise there is ambiguity, so then do we need different classes and methods for each WSDL service reference?
Is there a way to only use the live WSDL as the service reference but pass in the sandbox endpoint url so it hits their test site? Is there anything else needed to be able to do this?
Ideas? Thanks, ks