Web Services Help: Can you choose a Web Service at run time?

L

len smith

I'd like to build a content management application that can connect to
any webserver to manage content. Can I do this with Web Services? Is
it possible to choose a web service at run time, or would such a project
have to be recompiled to use a specific web server?

Thanks!
 
N

Nicholas Paldino [.NET/C# MVP]

Len,

You could do this at runtime, but you would have to have a lot of
administrative code behind it. The reason is that one content management
system could have one interface for the functionality that you need, and
another could have another interface (programmatic, that is). Your task
becomes easier if you are going to place the same back end code (web
service) on each server, then you can use one reference on the client side,
and just change where you are directing the call to.

If you can not be assured that the servers share the same interface,
then you will have to create the requests for the web service dynamically.
..NET will help with this, but it still will be a lot of work.

Hope this helps.
 
C

Christopher Dundon

You should be able to do this by modifying the Url
property before calling the methods. For example:

localhost.WebService WS = new localhost.WebService();
WS.Url = "http://www.newurl.com";
WS.DoMethod();

If that's what you're looking to do, hope this helps.

- Chris
 

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