Friday, September 23, 2005

SOAP : "Dynamic" web service

Using SOAP and web services, this is something I have found useful.

Basically, the original question was: "Is it possible to allow an application to access webservices without specifically adding a web reference in the project? In other words, can an application be created which allows the 'user' to specify the URL, and then call whatever webmethods may exist on that server?"

This may be a bit of a hack but hey "If the shoe fits ....".

What you could do is have dummy stubs

e.g. int Method1 (int)
string Method2 (string)

and so on and code each differently on the server side.

So Method1 on URL1 will do something completely different to Method1 on URL2.

The important thing is that the WSDL signatures are correct.


No comments: