Home > Articles > Web Services

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

Q&A

  1. Is it necessary to create a proxy class for my XML Web service clients?

  1. Yes. The alternative to creating a proxy class via one of the tools described in this hour is to write all of the SOAP-handling functionality yourself and, for all intents and purposes, to recreate a proxy from scratch. This may be interesting as a learning exercise but is not practical for most development scenarios.

  1. Is there a way to create a single class that can broker selected references from several XML Web services?

  1. It is possible to create a single class that handles the methods of multiple XML Web services. This is done using WSDL.exe. To selectively eliminate unwanted methods from the resultant class, you have to directly remove them from the generated source code before compiling. This is beyond the scope of this book; attempting to alter these files can cause them to fail.

  1. Is there ever a reason to use WSDL.exe if you have Visual Studio .NET?

  1. Yes, there are several reasons. The first is that WSDL.exe allows you to create a class from multiple XML Web services at one time. This allows one class to serve all of your XML Web service functions, or at least to group together related services into several classes. The second reason is that you can control the location of the output DLL, making it easier to create one DLL and reuse it in multiple projects. You should expect Microsoft to add many of these features to the Web Reference dialogues in future releases.

  • + Share This
  • 🔖 Save To Your Account