Ajax and Java Web Services

Wednesday, March 17, 2010

Ajax and Java Web Services preview: In this chapter, I examine how Java Web Services can be used to support Ajax clients. Ajax, or Asynchronous JavaScript and XML, is a programming technique that enables you to create user interfaces for a Web browser that behave more like a local, stand-alone application than a collection of HTML pages. Ajax is a good fit with Java Web Services. Using these two technologies together enables you to publish software components as services (via JAXWS) and create great browser-based user interfaces on top of them (via Ajax). The entire application can then be packaged as an EAR or WAR and deployed on a Java EE application server. To demonstrate this capability, I pick up here where I left off at the end of Chapter 9. In that chapter, I showed you how to build an online shopping application, SOAShopper, which can search across multiple Web-service-enabled sites (i.e., eBay, Yahoo! Shopping, and Amazon). In this chapter, I show how you can develop an Ajax front-end to SOAShopper. In particular, the code examined in this chapter demonstrates how to write an Ajax application that consumes RESTful Java Web Services endpoints. In the second half of this chapter, I review the JavaScript code that implements the SOAShopper Ajax front-end in quite a bit of detail. For those of you who are familiar with Web front-end coding and JavaScript, this detail may seem tedious. I include it because my assumption is that many readers of this book are server-side Java programmers who do not usually do a lot of JavaScript development and, therefore, might be interested in the detailed code explanation…

Download Ajax and Java Web Services.Pdf

0 comments:

Post a Comment

 
 
 

locate all visitor site