ABSTRACT

In Depth You have now learned how to create basic ASP.NET Web Services using Managed C++. In this chapter, I will show you how to write Managed C++ code for consuming web services. The process of consuming a web service involves declaring the web services proxy class. Web service proxy classes essentially isolate the web service provider from the web service consumer and handle the necessary communication between the client and the web server. This communication is done according to a particular web service communication protocol. When developing ASP.NET Web Services with Visual C++ .NET you can choose a communication protocol-HTTPGET, HTTP-POST, and SOAP over HTTP. In this chapter, I will examine HTTP-GET, HTTP-POST, and SOAP over HTTP protocols and related web service proxy classes that focus primarily on SOAP. You will learn how to declare web service methods to use a particular protocol, how to declare web service proxy classes in web service consumer applications tailored for communication with web services using a particular protocol, how to call web service methods synchronously and asynchronously, how to throw and catch exceptions thrown from a web service method, and how to use SOAP headers for communicating additional information to and from a web service.