Preface

This book describes designing Web services using the current technologies available with the JavaTM 2 Platform, Enterprise Edition. This book and the accompanying JavaTM Adventure Builder Reference application (hereafter referred to as adventure builder) are part of the successful Java BluePrints program created by Sun Microsystems with the introduction of the J2EE platform. Application architects, developers, and students everywhere have used this program to better understand the programming model inherent in the J2EE platform.

Rather than providing information on how to use individual Java technologies to write applications, which falls within the realm of the companion Java Tutorial program, the Java BluePrints focuses on guidelines for application architecture and design, such as distributing J2EE application functionality across tiers and choosing among design options for Web services endpoints. This book describes the Web services and related technologies of the J2EE platform. Its focus is how to best apply these J2EE platform technologies to writing Web service applications. This book assumes that you have a basic knowledge of the J2EE platform, which you can get from The J2EE™ Tutorial, and is meant to be read in conjunction with Designing Enterprise Applications with the J2EE Platform, Second Edition, since that book covers the J2EE platform technologies for writing traditional enterprise applications.

This book is intended primarily for enterprise architects and application developers engaged in or considering writing Web services and Web service applications with the J2EE platform. It is also useful for product vendors interested in developing Web service applications consistent with the J2EE platform standard.

Obtaining the Reference Application

The adventure builder reference application, which is described in this book, is available on the compact disk included with this book. You can also download it from:

http://java.sun.com/blueprints/code/

The application requires a J2EE version 1.4-compliant platform on which to run. The accompanying compact disk includes an implementation of this platform and an application server. You can download the J2EE SDKTM, which is a freely available implementation of that platform, from:

http://java.sun.com/j2ee/download.html

The Java BluePrints Web site includes additional content, available only online, that describes in detail the architecture of the Java adventure builder sample application.

References and Resources

Pointers to J2EE documentation can be found at:

http://java.sun.com/j2ee/1.4/docs

For information on how to use the J2EE SDK to construct multi-tier enterprise applications, refer to the J2EE Tutorial, available at:

http://java.sun.com/j2ee/1.4/docs/tutorial/docs

We relied on many of the following references for technical details and background. These references are good sources for those interested in exploring Web services in greater detail.

  1. Designing Enterprise Applications with the J2EE Platform, Second Edition. I. Singh, B. Stearns, M. Johnson, Enterprise Team. Copyright 2002, Addison-Wesley.

  2. The Java BluePrints Web site, <http://java.sun.com/blueprints>.

  3. Core J2EE Patterns: Best Practices and Design Strategies, Second Edition. D. Alur, D. Malks, J. Crupi. Copyright 2003, Prentice Hall PTR.

  4. Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. G. Hohpe, B. Woolf. Copyright 2003, Addison-Wesley.

The Web services standards cited in this book are:

  1. WS-I Basic Profile, Version 1.0. Available at <http://www.ws-i.org>.

  2. Simple Object Access Protocol, Version 1.1. Available at <http://www.w3.org>.

  3. Extensible Markup Language (XML), Version 1.0. Available at <http://www.w3.org>.

  4. Web Services Description Language, Version 1.1. Available at <http://www.w3.org>.

  5. XML Schema, Part 1 and 2. Available at <http://www.w3.org>.

  6. Universal Description, Discovery and Integration (UDDI), Version 2. Available at <http://www.w3.org>.

The J2EE technologies cited in this book are described in their specifications:

  1. Java™ 2 Platform, Enterprise Edition Specification, Version 1.4 (J2EE specification). Available at <http://java.sun.com/j2ee/>.

  2. Java™ API for XML-Based RPC Specification, Version 1.1 (JAXP specification). Available at <http://java.sun.com/xml/jaxrpc/>

  3. Java™ API for XML Processing Specification, Version 1.2 (JAXP specification). Available at <http://java.sun.com/xml/jaxp/>

  4. SOAP with Attachments API for Java Specification, Version 1.2 (SAAJ specification). Available at <http://java.sun.com/xml/saaj/>

  5. Java API for XML Registries Specification, Version 1.0 (JAXR specification). Available at <http://java.sun.com/xml/jaxr/>

  6. Web Services for J2EE Specification, Version 1.1. Available at <ftp://www.ibm.com/pub/jsr109/spec1.1/>

  7. Java API for XML Binding Specification (JAXB specification). Available at <http://java.sun.com/xml/jaxb/>

  8. Java™ Servlet Specification, Version 2.4 (Servlet specification). Available at <http://java.sun.com/products/servlet/>

  9. JavaServer Pages™ Specification, Version 2.0 (JSP specification). Available at <http://java.sun.com/products/jsp/>

  10. Enterprise JavaBeans™ Specification, Version 2.1 (EJB specification). Available at <http://java.sun.com/products/ejb/>

  11. J2EE™ Connector Architecture Specification, Version 1.5 (Connector specification). Available at <http://java.sun.com/j2ee/connector/>

  12. Java™ Message Service Specification, Version 1.0.2 (JMS specification). Available at <http://java.sun.com/products/jms/>

Typographic Conventions

The following table describes the typographic conventions used in this book.

Typeface or SymbolMeaningExample
AaBbCc123The names of commands, files, and directories; interface, class, method, and deployment descriptor element names; programming language keywordsEdit the file Main.jsp.

How to retrieve a UserTransaction object.

Specify the resource-ref element.
AaBbCc123Variable nameThe files are named XYZfile.
AaBbCc123Book titles, new words or terms, or words to be emphasizedRead Chapter 6 in Users Guide. These are called class options. You must be root to do this.

Recommendations, guidelines, and key points are highlighted throughout the book. They are marked with check boxes, as follows:

This is a recommendation, guideline, or key point.

How This Book Is Organized

This book is divided into the following chapters:

  • Chapter 1, “Introduction,” describes Web services and explains the support provided by the J2EE 1.4 platform for Web services.

  • Chapter 2, “Standards and Technologies,” enumerates and describes in detail the Web services-specific component, service, and communication technologies supported by the J2EE 1.4 platform.

  • Chapter 3, “Service Endpoint Design,” describes how best to design and implement a Web service endpoint.

  • Chapter 4, “XML Processing,” addresses in detail the issues for designing and developing XML-based applications and handling XML documents. In particular, it focuses on those issues that are of most concern to Web service endpoints and clients.

  • Chapter 5, “Client Design,” describes the different communication modes that J2EE and non-J2EE clients alike use to access Web services. It includes guidelines and techniques for writing efficient Web service client applications.

  • Chapter 6, “Enterprise Application Integration,” describes the capabilities provided by the J2EE platform for using Web services to integrate applications and data, and shows how to best use these capabilities in an enterprise application.

  • Chapter 7, “Security,” describes the J2EE security model and how it applies to Web service endpoints and clients.

  • Chapter 8, “Application Architecture and Design,” pulls the topics in the preceding chapters together into a coherent programming model that illustrates how best to design and develop Web service endpoints and clients.

  • “Glossary” is a list of words and phrases found in this book and their definitions.

Acknowledgments

This book is the result of many people's efforts. In particular, we want to thank the following people for taking the time to extensively review the contents of this book, often more than once: Smitha Kangath, Roberto Chinnici, Randy Thomas, and Matthias Weidmann. Other reviewers include Yutaka Yoshida, Mark Roth, Phil Goodwin, Arun Gupta, Jon Ellis, Bill Shannon, Sang Shin, Leslie McNeill, and Debra Scott.

Smitha Kangath, while not listed as an author, contributed content throughout the book. She was also instrumental in implementing many of the concepts presented here and verifying their accuracy.

Mark Hapner contributed many of the ideas that are presented in the book. He also reviewed a number of chapters.

Arun Gupta, in addition to reviewing a good part of the book, also guided us on SOAP interoperability issues. Joe Fialli extensively reviewed the XML chapter and provided clarifications for a number of issues. In a similar manner, Ram Jeyaraman provided an insightful review of the integration chapter, and Manveen Kaur did likewise with the security chapter. Rajiv Mordani provided helpful comments on several of the chapters, including the XML chapter. Ron Monzillo did an extensive review of the security chapter and also contributed some key ideas.

We would also like to thank John Crupi, Deepak Alur, and Dan Malks for reviewing many chapters and providing insightful comments.

Other reviewers whose comments helped us bring a much better book to market are Peter den Haan, Kevin P. Davis, Vijay S. Phagura, Rich Wardwell, Bob Withers, and Vartan Piroumian.

We would also like to thank the J2EE group at Sun Microsystems. Some of the key resources for us were Ken Saks, Tony Ng, Harpreet Singh, Vivek Nagar, Bill Shannon, Eduardo Pelegri-Llopart, Craig McClanahan, Doug Kohlert, and Linda DeMichiel. Hans Muller reviewed the client chapter and Eve Maler reviewed the security chapter.

Our special thanks go to our management, Larry Freeman, Jim Driscoll, Vivek Nagar, Karen Tegan, and Jeff Jackson, for their whole-hearted support and commitment to the BluePrints program and to this book in particular. Larry was always very supportive, encouraging, and resourceful whenever we hit a road block. This book would not have been possible without his support and commitment. We also want to especially thank our program manager, Jennifer Douglas. She kept us on track during this project while at the same time encouraging us to have fun with it, too.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset