• Sign up
  • ‎What is Shvoong?‎
  • Sign In
    Sign In
    Remember my username Forgot your password?

Summaries and Short Reviews

.

Shvoong Home>Science>Calling Web Services with AJAX Summary

.

Calling Web Services with AJAX

Book Abstract by: Saifi Hasan    

Original Author: saifi hasan
If you have ever consumed a Web service in the Microsoft .NET Framework, either by creating a proxy using the wsel.exe utility
or by using the Add Web Reference feature of Visual Studio®, you are accustomed to working with .NET types to call Web services. In fact, invoking a Web service method through a .NET proxy is exactly like calling methods on any other class. The proxy takes care of preparing the XML based on the parameters you pass, and it carefully translates the XML response it receives into the .NET type specified by the proxy method. The ease with which developers can use the .NET Framework to consume Web service endpoints is incredibly enabling, and is one of the pillars that make service-oriented applications feasible today.The ASP.NET 2.0 AJAX Extensions enable this exact same experience of seamless proxy generation for Web services for client-side JavaScript that will run in the browser. You can author an .asmx file hosted on your server and make calls to methods on that service through a client-side JavaScript class. For example, Figure1 shows a simple .asmx service that implements a faux stock quote retrieval (with random data).In addition to the standard .asmx Web service attributes, this service is adorned with the ScriptService attribute that makes it available to JavaScript clients as well. If this .asmx file is deployed in an ASP.NET AJAX-Enabled Web application, you can invoke methods of the service from JavaScript by adding a ServiceReference to the ScriptManager control in your .aspx file (this control is added automatically to your default.aspx page when you create a Web site in Visual Studio using the ASP.NET AJAX-enabled Web site template):
Published: February 21, 2007
Please Rate this Review : 1 2 3 4 5

Bookmark & share this post

.