I have a C# project which has many web references to a third party product. All of these web service calls use a 'user context' class. So each web service accepts the exact same XML snippet.
Currently I have to keep many of these 'user context' objects around as I hit all the different web service calls. The generated 'user context' class is the exact same but just put in different .NET namespaces (the XML namespace is the same).
I would like to be able to have only one of these instances passed around. How could I do that?
I am using Visual Studio 2010 and using the generated class by adding a WebReference. I'm not opposed to using some other framework or mechanism. I had even thought of rolling my own code, but there are many WebServices (each with many web methods) that I will need to use.
Update: I originally added these by adding a Web Reference, I will now be adding them as a Service Reference. The web services themselves are exposed through InterSystems Caché and I haven't looked into how well they conform to WS-I.