web service URL - changing at run-time

web service URL - changing at run-time

Post by bill » Wed, 19 Oct 2005 02:50:18


I understand how to change the URL of a web service at run-time. But, if I
am using a web service in a windows application, what is a good way to
inform the application of the current location of the web service, without
recompiling and redistributing the application?
 
 
 

web service URL - changing at run-time

Post by Peter Kelc » Wed, 19 Oct 2005 03:27:50

Bill,

One thing you might want to take a look at, is setting up a UDDI
server. It can be used to manage your web services in a central
location. Your client applications can easily query your UDDI server to
find the current location of you services. When you move a service, you
just update the setting in the server and all the clients will point to
the new location.

Windows 2003 ships with a UDDI server component . You can check out the
following links for more info.

http://www.yqcomputer.com/
http://www.yqcomputer.com/

Another thing you can look at, is just setting the URLBehaviour
property of your web reference to dynamic. With this setting, the URL
of your web service is stored in your web.config. This would allow you
to avoid having to recompile your application. However, you would still
have to redeploy a new web.config. Therefore, I would recommend the
UDDI server.

Hope that helps

Peter Kelcey

 
 
 

web service URL - changing at run-time

Post by S3VtYXIgU2 » Thu, 20 Oct 2005 03:33:03

Setting up UDDI could be the ideal wayout.
Another way could be you can read it from an XML file, so that you dont have
worry about recompling.

-- Kumar Shetgar