09-14-05 12:48 PM
Sheila,
You can access webservice dynamically using URL property of the
webservice proxy class. Open Reference.cs from your client project and
override the constructor like below shown code.
public Service1(string urlDynamic) // Say Service1 is your Proxy constructor
{
this.Url =urlDynamic;
}
Form your client code you instantiate the webservice like
localhost.Service1 objTest = new localhost.Service1(
"http://<dynamicaddress>/Test/Service1.asmx");
string retVal=objTest.HelloWorld("Selvan");
Hope this help.
Cheers...
Tamilselvan Subramanian,
Integration Analyst,
IBM Global Services India Ltd.
"Sheila" wrote:
> Hi,
>
> I published a orchestration web service and tested working fine when calli
ng
> this web service from a windows application. The web service reference URL
is
> defined in web service properties. Now I want the application to dynamical
ly
> access the Webservices at run time. I tried changing the web service url i
n
> app.config file but it doesn't work. Does anybody know what could be the
> reason. Is there any other way to do it.
>
> Thanks in advance.
[ Post a follow-up to this message ]
|