Im consuming some webservice from a third-party product. So ive add righ-clicking on service reference and generating the code on the web.config file.
But the problem is, foreach company i consume the service, they have one endpoint address (and they have more then 30 companies). So, its insane to add one reference foreach company (to execute the same method in these webservices).
So, i would like to know if it is possible and how can i do a WebServiceHelper class, with some GetWebService(url) method wich allows me send just the url of the webservice and create my service model.
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ITestService" receiveTimeout="10:00:00"
sendTimeout="10:00:00" maxReceivedMessageSize="2147483647" transferMode="Buffered"
useDefaultWebProxy="true" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://xxxx.xxx"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ITestService"
contract="Test.TESTSOAP" name="BasicHttpBinding_ITestService" />
</client>