web service problem
-
hi guys i have problem with inter communication of web services... in my solution i have client form(windows project),web service called broker(in web site1) and another two web services A and B (in web site 2). i added web reference of A and B to website 1. also i added web reference of Broker to my windows project. now i just wanna call method in A or B from my client form.to do this i wanna call broker to get URL of A or B. prob:how can i call method of a A(web service) or B(web Service) using that url... can somebody give me a solution....
-
hi guys i have problem with inter communication of web services... in my solution i have client form(windows project),web service called broker(in web site1) and another two web services A and B (in web site 2). i added web reference of A and B to website 1. also i added web reference of Broker to my windows project. now i just wanna call method in A or B from my client form.to do this i wanna call broker to get URL of A or B. prob:how can i call method of a A(web service) or B(web Service) using that url... can somebody give me a solution....
If you create a proxy to your web service you can dynamically switch between different urls. The proxy class could look something like this:
class WebServiceProxy : YourWebservices.orderService
{
public WebServiceProxy(string p_url)
{
this.Url = p_url;
}
}Then the call looks like:
WebServiceProxy ws = new WebServiceProxy("yoururl");
ws.yourMethod();Hope that helps. Ben