Removing a Web Service from an Application

Throughout this book, you have used the Add Web Reference dialog box to add a web service to a program by specifying the location of the service’s WSDL statements. As your programs evolve, there may be times when the program no longer needs a web service you previously added to the program. To remove the web service from your program, you use the Visual Studio .NET Solution Explorer as follows:

  1. Within Visual Studio .NET, display the Solution Explorer, if it is not currently open, by selecting the View menu Solution Explorer option.

  2. Within the Solution Explorer, right-click the entry for the web service you no longer desire (for the web services that you create yourself, you will right-click the service’s localhost entry). Visual Studio .NET will display a popup menu.

  3. Within the popup menu, select Delete.

In a similar way, there will be many times when you change a web service, possibly by adding a new method or by changing the number of parameters a method supports. In such cases, you must update the web reference the program is using to access the web service. That’s because the web reference contains the SOAP entries that define the service’s parameters. If you do not update the web reference, your program will not be aware of the changes you have made. To update the web service, simply use the Add Web Reference dialog box to replace the existing web service.




. NET Web Services Solutions
.NET Web Services Solutions
ISBN: 0782141722
EAN: 2147483647
Year: 2005
Pages: 161
Authors: Kris Jamsa

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net