Some of the more important takeaways from this chapter are as follows:
- Ajax and Java EE support a nice separation of concerns, where server-side Java EE handles the hard-code SOA integration and deployment of Web service endpoints, and Ajax provides an attractive and user-friendly front-end.
- The entire application, Ajax front-end, and Java EE back-end can be bundled as a single EAR for painless deployment to any Java EE application server.
- When creating and deploying Java EE service endpoints, it is probably good practice, at least for the more complex services, to create a simple Ajax front-end to go along with the service. An Ajax frontend makes it easy for the consumers of a service you have written 480 Ajax and Java Web Services to visually experience the data your service returns. The ability to "play" with a Web service in such a manner can give a developer a much better intuitive sense for the service interface than a WSDL or XML schema.
This chapter from "SOA Using Java Web Services" examines how to build an Ajax front-end to an online shopping application. Through detailed code examples, it walks you through building an Ajax application that consumes RESTful Java Web services endpoints.
- Posted by: Joseph Ottinger
- Posted on: June 12 2007 11:53 EDT
- Use Google Web Toolkit by David Tinker on June 13 2007 01:52 EDT
- Use soapUI by Ole Matzura on June 13 2007 06:14 EDT
- The Book Uses Dojo by Mark Hansen on June 13 2007 21:34 EDT
- Re: Excerpt: Ajax and Java Web Services by Anthony Goubard on June 14 2007 11:41 EDT
Anyone that enjoys swing development is one sick puppy. =p
.. What I do not like about GWT is that it is based on the assumption that most of us Java Developers like Swing like development...
If we're talking about a rich palette of GUI components and ease of development, Tibco GI is doing a fantastic job there. Its free, has a great IDE and comes with a Apache License
You (and your service consumers) could also use soapUI for playing around with a web-service and getting a feeling for the data it returns, it's probably easier than creating a dedicated ajax client and has better support for ws-related standards.. (and a sleuth of other stuff..) cheers! /Ole eviware.com
If you want to do Ajax with your Web Services, I advice you to have a look at XINS ( http://xins.sourceforge.net/ ). The Web Services developed with it accept RESTful, SOAP, XML-RPC but also since version 2.0 "Yahoo! JSON" which is easy to use with Google Web Toolkit and JSON-RPC (1.0 and 1.1) which is easy to use with the DOJO toolkit. It also generates the SMD (Simple Method Description) that the DOJO toolkit understands. Click Here to see the code for an Ajax call to a Web Service using the DOJO toolkit. Anthony