Home > Articles > Web Services > XML

  • Print
  • + Share This
This chapter is from the book

Q&A

  1. Why use Visual Studio if the .NET Framework allows you to create XML Web services in Notepad?

  1. Although Notepad is sufficient for the small examples that you worked on in this hour, your code will quickly become more difficult to manage without the help of Visual Studio. The ability to create code regions, place code in modules, access help files, and use a myriad of other features provided by Visual Studio will prove invaluable when you begin creating real-world services.

  1. Can a single XML Web service project provide multiple services?

  1. Yes, you can add multiple services to your XML Web service project. These services are all compiled as different asmx files and share the same Global.asax file. For example, we could have added a second set of functions to our calculator to support working with hexadecimal numbers. We could have placed these functions in a second service and allowed clients to access them separately. In future hours, we will see examples of XML Web service projects that expose multiple services.

  1. Is adding the optional description to methods worth the extra effort?

  1. Yes, it certainly is. If your methods are exposed to external clients, life is much simpler if they can see a small description of each method when they write code to use your service. Even if your methods are exposed only internally and used only by the people who wrote them, you will eventually forget what some functions do; having these little reminders can save you the trouble of having to look up reference material or seeking out the source code to read the comment lines.

  • + Share This
  • 🔖 Save To Your Account