It's been a long time since I worked with SOAP so my question might be trivial but I just wasn't able to find a satisfying answer so far!
Anyways here's what's going on:
- I got access to a system via SOAP endpoints (Dev, Test and Prod)
- I used svcutil to create proxy classes (they are almost identical, only few lines difference)
- I created an interface for my SOAP operations and implemented one class for each environment (Dev/Test/Prod)
Now I do like that I have separate classes since we might do logging or whatever in a different manner in production environment, however the business logic is pretty much the same but reusing the code doesn't seem feasable... even though the generated classes are the same, they live in different namespaces and I don't really want to touch generated code!
If they used REST it wouldn't be a problem but I'm having trouble to solve this problem gracefully with SOAP. How would you approach this?
EDIT: I am aware that the obvious simple solution would be to generate proxy class only once and use them for all the environments. However I'm not sure if that's the right approach since the different endpoints might change (although I would prefer of course if the API provider would make sure they're always identical but not sure if that's always possible in real life scenarios!)