Available:*
Library | Item Barcode | Call Number | Material Type | Item Category 1 | Status |
---|---|---|---|---|---|
Searching... | 30000004707737 | QA76.73.J38 D47 2004 | Open Access Book | Book | Searching... |
On Order
Summary
Summary
Written by Sun Microsystems' Java' BluePrints team, this book is a guide to designing and integrating enterprise-level Web services using the Java 2 Platform, Enterprise Edition (J2EE) 1.4. It provides the guidelines, patterns, and real-world examples for architects and developers.
Author Notes
Inderjeet Singh is lead architect on the Java BluePrints Team, where he works with other architects and engineers to define best uses of Java technologies for application design. Beth Stearns is the principal partner of ComputerEase Publishing, a computer consulting firm she founded in 1982. Among her publications are Java Native Interface in The Java Tutorial Continued (Addison-Wesley), "The EJB Programming Guide" for Inprise Corporation, and " Understanding EDT, " a guide to Digital Equipment Corporation's text editor.
Excerpts
Excerpts
This book describes designing Web services using the current technologies available with the Java™ 2 Platform, Enterprise Edition. This book and the accompanying Java™ 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 SDK™, 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. Designing Enterprise Applications with the J2EE Platform, Second Edition. I. Singh, B. Stearns, M. Johnson, Enterprise Team. Copyright 2002, Addison-Wesley. The Java BluePrints Web site, < http://java.sun.com/blueprints >. Core J2EE Patterns: Best Practices and Design Strategies, Second Edition. D. Alur, D. Malks, J. Crupi. Copyright 2003, Prentice Hall PTR. 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: WS-I Basic Profile, Version 1.0. Available at < http://www.ws-i.org >. Simple Object Access Protocol, Version 1.1. Available at < http://www.w3.org >. Extensible Markup Language (XML), Version 1.0. Available at < http://www.w3.org >. Web Services Description Language, Version 1.1. Available at < http://www.w3.org >. XML Schema, Part 1 and 2. Available at < http://www.w3.org >. 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: Java™ 2 Platform, Enterprise Edition Specification, Version 1.4 (J2EE specification). Available at < http://java.sun.com/j2ee/ > Java™ API for XML-Based RPC Specification, Version 1.1 (JAXP specification). Available at < http://java.sun.com/xml/jaxrpc/ > Java™ API for XML Processing Specification, Version 1.2 (JAXP specification). Available at < http://java.sun.com/xml/jaxp/ > SOAP with Attachments API for Java Specification, Version 1.2 (SAAJ specification). Availa ble at < http://java.sun.com/xml/saaj/ > Java API for XML Registries Specification, Version 1.0 (JAXR specification). Available at < http://java.sun.com/xml/jaxr/ > Web Services for J2EE Specification, Version 1.1. Available at < ftp://www.ibm.com/pub/jsr109/spec1.1/ > Java API for XML Binding Specification (JAXB specification). Available at < http://java.sun.com/xml/jaxb/ > Java™ Servlet Specification, Version 2.4 (Servlet specification). Available at < http://java.sun.com/products/servlet/ > JavaServer Pages™ Specification, Version 2.0 (JSP specification). Available at < http://java.sun.com/products/jsp/ > Enterprise JavaBeans™ Specification, Version 2.1 (EJB specification). Available at < http://java.sun.com/products/ejb/ > J2EE™ Connector Architecture Specification, Version 1.5 (Connector specification). Available at < http://java.sun.com/j2ee/connector/ > Java™ Message Service Specification, Version 1.0.2 (JMS specification). Available at < http://java.sun.com/products/jms/ > 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. Excerpted from Designing Web Services with the J2EE 1. 4 Platform: JAX-RPC, SOAP, and XML Technologies by Inderjeet Singh, Sean Brydon, Greg Murray, Vijay Ramachandran, Thierry Violleau, Beth Stearns All rights reserved by the original copyright owners. Excerpts are provided for display purposes only and may not be reproduced, reprinted or distributed without the written permission of the publisher.Table of Contents
Foreword | p. xiii |
About the Authors | p. xvii |
Preface | p. xix |
1 Introduction | p. 1 |
1.1 What Are Web Services? | p. 3 |
1.2 Benefits of Web Services | p. 6 |
1.3 Challenges of Web Service Development | p. 8 |
1.3.1 Evolving Technologies and Products | p. 8 |
1.3.2 Security | p. 9 |
1.3.3 Reliability, Availability, and Scalability | p. 10 |
1.4 Typical Web Service Scenarios | p. 11 |
1.4.1 Interacting with Business Partners | p. 14 |
1.4.2 Integrating with Existing Enterprise Information Systems | p. 15 |
1.4.3 Reaching Diverse Clients | p. 15 |
1.4.4 Aggregation of Partner Data | p. 16 |
1.5 J2EE 1.4: The Platform for Web Services | p. 17 |
1.5.1 J2EE Platform Overview | p. 17 |
1.5.2 J2EE Platform Benefits | p. 19 |
1.5.3 J2EE Platform Technologies | p. 21 |
1.6 Conclusion | p. 24 |
2 Standards and Technologies | p. 27 |
2.1 Overview of Web Service Standards | p. 27 |
2.1.1 Extensible Markup Language | p. 29 |
2.1.2 Simple Object Access Protocol | p. 33 |
2.1.3 Registry Standards | p. 35 |
2.1.4 Web Services Description Language | p. 36 |
2.1.5 Emerging Standards | p. 40 |
2.2 J2EE: The Integrated Platform for Web Services | p. 40 |
2.2.1 Java APIs for XML Processing | p. 41 |
2.2.2 Java API for XML-Based RPC | p. 44 |
2.2.3 Java API for XML Registries | p. 47 |
2.2.4 SOAP with Attachments API for Java | p. 48 |
2.2.5 Web Service Technologies Integrated in J2EE Platform | p. 49 |
2.2.6 Support for WS-I Basic Profile | p. 51 |
2.3 Other Java-XML Technologies | p. 52 |
2.4 Conclusion | p. 54 |
3 Service Endpoint Design | p. 57 |
3.1 Example Scenarios | p. 58 |
3.2 Flow of a Web Service Call | p. 59 |
3.3 Key Web Services Design Decisions | p. 61 |
3.4 Designing a Service's Interaction Layer | p. 66 |
3.4.1 Designing the Interface | p. 66 |
3.4.2 Receiving Requests | p. 89 |
3.4.3 Delegating Web Service Requests to Processing Layer | p. 92 |
3.4.4 Formulating Responses | p. 98 |
3.5 Processing Layer Design | p. 99 |
3.6 Publishing a Web Service | p. 101 |
3.6.1 Publishing a Service in a Registry | p. 101 |
3.6.2 Understanding Registry Concepts | p. 102 |
3.6.3 Registry Implementation Scenarios | p. 103 |
3.7 Handling XML Documents in a Web Service | p. 105 |
3.7.1 Exchanging XML Documents | p. 107 |
3.7.2 Separating Document Manipulation from Processing Logic | p. 111 |
3.7.3 Fragmenting XML Documents | p. 111 |
3.7.4 Using XML | p. 111 |
3.7.5 Using JAXM and SAAJ Technologies | p. 112 |
3.8 Deploying and Packaging a Service Endpoint | p. 113 |
3.8.1 Service Information in the Deployment Descriptors | p. 113 |
3.8.2 Package Structure | p. 117 |
3.9 Conclusion | p. 119 |
4 XML Processing | p. 121 |
4.1 XML Overview | p. 122 |
4.1.1 Document Type and W3C XML Schema Definitions | p. 125 |
4.1.2 XML Horizontal and Vertical Schemas | p. 126 |
4.1.3 Other Specifications Related to XML | p. 127 |
4.2 Outline for Handling XML Documents | p. 128 |
4.3 Designing XML-Based Applications | p. 131 |
4.3.1 Designing Domain-Specific XML Schemas | p. 131 |
4.3.2 Receiving and Sending XML Documents | p. 135 |
4.3.3 Validating XML Documents | p. 139 |
4.3.4 Mapping Schemas to the Application Data Model | p. 143 |
4.3.5 Choosing Processing Models | p. 151 |
4.3.6 Fragmenting Incoming XML Documents | p. 153 |
4.3.7 Abstracting XML Processing from Application Logic | p. 155 |
4.3.8 Design Recommendation Summary | p. 163 |
4.4 Implementing XML-Based Applications | p. 164 |
4.4.1 Choosing an XML Processing Programming Model | p. 164 |
4.4.2 Combining XML Processing Techniques | p. 176 |
4.4.3 Entity Resolution | p. 178 |
4.5 Performance Considerations | p. 182 |
4.5.1 Limit Parsing of Incoming XML Documents | p. 184 |
4.5.2 Use the Most Appropriate API | p. 184 |
4.5.3 Choose Effective Parser and Style Sheet Implementations | p. 186 |
4.5.4 Reduce Validation Cost | p. 188 |
4.5.5 Reduce the Cost of Referencing External Entities | p. 189 |
4.5.6 Cache Dynamically Generated Documents | p. 193 |
4.5.7 Use XML Judiciously | p. 194 |
4.6 Conclusion | p. 196 |
5 Client Design | p. 199 |
5.1 Choosing a Communication Technology | p. 200 |
5.2 Scenarios for Web Services-Based Client Applications | p. 201 |
5.2.1 Designing J2EE Clients | p. 205 |
5.2.2 Designing J2SE Clients | p. 207 |
5.2.3 J2ME Clients | p. 208 |
5.3 Developing Client Applications to Use a Web Service | p. 210 |
5.3.1 Communication Modes for Accessing a Service | p. 212 |
5.3.2 Locating and Accessing a Service | p. 219 |
5.3.3 Stubs and Call Configuration | p. 223 |
5.3.4 WSDL-to-Java Type Mapping | p. 225 |
5.3.5 Processing Return Values | p. 227 |
5.3.6 Handling Exceptions | p. 230 |
5.4 General Considerations | p. 235 |
5.4.1 Managing Conversational State | p. 235 |
5.4.2 Enhancing User Experience | p. 237 |
5.4.3 Server-Side Design Considerations for Clients | p. 239 |
5.4.4 Packaging | p. 240 |
5.5 Conclusion | p. 245 |
6 Enterprise Application Integration | p. 247 |
6.1 Integration Requirements and Scenarios | p. 248 |
6.1.1 Typical Integration Scenarios | p. 248 |
6.1.2 Example Integration Scenarios | p. 249 |
6.2 J2EE Integration Technologies | p. 252 |
6.2.1 Relational Database Integration Technologies | p. 253 |
6.2.2 Messaging Technologies | p. 255 |
6.2.3 EIS Access Technologies | p. 259 |
6.2.4 Web Service and XML Technologies | p. 262 |
6.3 Integration Design Approaches | p. 263 |
6.3.1 Web Services Approach | p. 266 |
6.3.2 Enterprise Beans and JMS Approach | p. 271 |
6.3.3 The Connector Approach | p. 271 |
6.3.4 Combining Approaches into an Integration Architecture | p. 272 |
6.4 Data Integration Guidelines | p. 274 |
6.4.1 Data Mapping in EAI Applications | p. 274 |
6.4.2 Data Transformation | p. 275 |
6.4.3 Data Filtering | p. 282 |
6.5 Guidelines for Integration | p. 283 |
6.5.1 Integrating Custom Legacy Systems | p. 283 |
6.5.2 Using Screen Scraping for Integration | p. 284 |
6.5.3 Metadata | p. 285 |
6.5.4 Using Registries for Integration | p. 286 |
6.5.5 Versioning and Evolution | p. 286 |
6.5.6 Writing Applications for Integration | p. 288 |
6.6 Conclusion | p. 288 |
7 Security | p. 291 |
7.1 Security Scenarios | p. 292 |
7.1.1 General Security Requirements | p. 293 |
7.1.2 Security Implications of the Operational Environment | p. 297 |
7.2 J2EE Platform Security Model | p. 297 |
7.2.1 Authentication | p. 299 |
7.2.2 Authorization | p. 304 |
7.2.3 Confidentiality and Integrity | p. 307 |
7.3 Security for Web Service Interactions | p. 308 |
7.3.1 Endpoint Programming Model | p. 308 |
7.3.2 Client Programming Model | p. 314 |
7.3.3 Propagating Component Identity | p. 316 |
7.3.4 Handling Authorization | p. 320 |
7.3.5 JAX-RPC Security Guidelines | p. 324 |
7.4 Message-Level Web Service Security | p. 326 |
7.4.1 Understanding Message-Level Security | p. 326 |
7.4.2 Comparing Security Mechanisms | p. 328 |
7.4.3 Emerging Message-Level Security Standards | p. 331 |
7.5 Conclusion | p. 337 |
8 Application Architecture and Design | p. 339 |
8.1 Overview of Adventure Builder | p. 339 |
8.1.1 Order Processing Center Sub-Modules and Interactions | p. 342 |
8.2 Order Processing Center Architecture and Design | p. 344 |
8.2.1 Web Service Interaction and Message Exchange | p. 345 |
8.2.2 Communication Architecture | p. 349 |
8.3 Endpoint Design Issues | p. 351 |
8.3.1 Web Service Interface Development Approach | p. 351 |
8.3.2 Endpoint Type Considerations | p. 352 |
8.3.3 Granularity of Service | p. 353 |
8.3.4 Passing Parameters as Documents or Java Objects | p. 353 |
8.3.5 Layering the Service | p. 355 |
8.3.6 Delegating to Business Logic | p. 357 |
8.3.7 Client Considerations | p. 357 |
8.3.8 Publishing Web Service Details | p. 358 |
8.4 Web Service Communication Patterns | p. 358 |
8.4.1 Correlating Messages | p. 359 |
8.4.2 Splitting and Joining Messages | p. 361 |
8.4.3 Refactoring Synchronous to Asynchronous Interactions | p. 363 |
8.5 Managing Complex Web Service Interactions | p. 366 |
8.5.1 Passing Context Information on Web Service Calls | p. 366 |
8.5.2 Handling Multiple Document Types | p. 371 |
8.5.3 Consolidating Web Service Interactions | p. 373 |
8.5.4 Canonical Data Model | p. 375 |
8.6 Building More Robust Web Services | p. 376 |
8.6.1 Use Idempotent Endpoints | p. 377 |
8.6.2 Use Client Retries with Idempotent Endpoints | p. 378 |
8.6.3 Handling Asynchronous Interaction Error Conditions | p. 379 |
8.7 Conclusion | p. 381 |
Glossary | p. 383 |
Index | p. 403 |