Dynamic Webservice UrL consumption

B

Bit byte

I want to write a C# application that uses a webservice - i.e. is a
webservice client. However, I want to be able to read the Url of the
webservice from a configuration file - since the webservice server
address may change.

So far I have not found any examples of how to do this - any ideas?
 
G

Guest

Bit Byte,
Basically the pattern is as follows:

MyWebServiceProxy proxy =new MyWebServiceProxy();
proxy.Url = ConfigurationSettings.AppSettings["webServiceUrl"];

proxy.MyMethodCall(param. etc);

That's it.
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top