Last post Jan 08, 2013 05:42 AM by furry
Jan 07, 2013 06:50 AM|SwapnaRajPrasad|LINK
I have a .net website where I am accessing a SOAP Webservice.
I have tested everything and it is time to move to UAT environment.
IN UAT environment the SOAP webservices are in a different IP.
I changed the the IP in web.config but I dont find the webservices getting updated to point new location.
When I add this by adding webreference things are working.
But my client is not ready to remove and add webreference, but want to make changes in web.config only.
Jan 07, 2013 07:58 AM|furry|LINK
if i am not wrong you need to change the Service URL in disco and wdl files of published version.
Jan 08, 2013 03:23 AM|SwapnaRajPrasad|LINK
Thanks for the response. That means I need to change the ips in wsdl file and disco file generated by visual studio when we do add webreference?
Is there any white paper refering this issue and I can show this to my client as proof?
Thanks for any help,
Jan 08, 2013 05:42 AM|furry|LINK
Yes you need to change in those files.
i am not able to find any authentic reading material for this, its just from my past experience with webservices.
actually what happens is, when we add a webreference to VS project, it creates a proxy class and keeps the URL inside wsdl & disco files.
there is one more approach i used long time ago.
before you consume the method of your webservice, change the URL of your service in object.
ServiceNamespace.Class obj = new ServiceNamespace.Class();
obj.Url = "New URL\service.asmx";
for testing pupose execute, Response.Write(obj.Url); before and after changing the URL. ofcourse make sure you have same webservices deployed at different locations. otherwise you'll encounter soap exceptions.
i am not a Gru in this area, but this has worked for me. may be somebuddy else can share a good reading material.