WCF consumes multiple web services dynamically

I need to reuse multiple web services (this is the same service hosted in several places). How can i do this?

Thank.

+3
source share
1 answer

If its the same service in several places, then the only difference between the services will be the URL.

There is an overload of the client service constructor that takes the URL as a parameter - you can provide an instance of the endpoint class or just a simple string.

This reduces the problem by providing the appropriate string to the constructor at run time, which should be fairly simple (-:

, ( ) URL- , , , .

+4

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


All Articles