Many websites using the same class

I have a C # project that has many website links for a third-party product. All these web service calls use the user context class. Therefore, each web service accepts the same XML fragment.

Currently, I have to store many of these "user context" objects as I hit all calls to various web services. The generated user context class is the same, but just fits into different .NET namespaces (the XML namespace is the same).

I would like to be able to have only one of these instances. How can i do this?

I am using Visual Studio 2010 and using the generated class by adding WebReference. I am not opposed to using any other structure or mechanism. I even thought about copying my own code, but there are many WebServices (each with many web methods) that I will need to use.

Update : I initially added them by adding a web link, now I will add them as a reference for the service. Web services themselves are exposed through InterSystems CachΓ©, and I haven't looked at how much they match WS-I.

+3
source share
2 answers

VS 2010, 2008 " ", , . -, , , -.

+2

, / XML. .

0

Source: https://habr.com/ru/post/1752659/


All Articles