Background
I am interfacing with a SOAP webservice, using C#. I am working in Visual Studio and have successfully set up a Service Reference and can use the web service in my code.
My questions are related to "how best" to design the client/wrapper to the API, considering the powerful features of C# as a language.
Central "Request" Class
I had the thought of creating an overall class to handle the requests to the service, and thus handle all of the various permutations of API specific errors (there are many), and degrade gracefully. This class could also perhaps be the "Controller" for the API client, which also provides the overall interface between internal calls and the outside world/code.
Then I noticed the sheer variety of data types that each API call requires and can return. Surely this means this "request" functionality cannot be handled generically (and must be implemented in each specific type of request - e.g. authentication, vehicle positions, jobs/orders)?
Or if it can, how can C# as a language, help me in working with types in an abstract manner?
As always, thank you for your time in reading and any advice you can spare.