How to dynamically add webservices in an application?
C#
1
Posts
1
Posters
0
Views
1
Watching
-
This is what I want to do: - I have made a WSDL (interface) which can be implemented by different web-services. Lets call this provideData.wsdl - I want to make a c# console application where I can dynamically add different services (different locations) which implements the same WSDL. Something like this:
static void Main(string[] args) { AddDataProvider("http://serviceA/a.asmx"); AddDataProvider("https://serviceB/b.asmx"); //Do something with the data, using a shared interface.. }
Normally when I consume a web-service in a C# project I just press "Add Service Reference...", but how can I do this dynamically with code? :^)