Synopses & Reviews
Learn how to design and develop distributed web services in Java using RESTful architectural principals and the JAX-RS specification in Java EE 6. With this hands-on reference, you'll focus on implementation rather than theory, and discover why the RESTful method is far better than technologies like CORBA and SOAP.
It's easy to get started with services based on the REST architecture. RESTful Java with JAX-RS includes a technical guide that explains REST and JAX-RS, how they work, and when to use them. With the RESTEasy workbook that follows, you get step-by-step instructions for installing, configuring, and running several working JAX-RS examples using the JBoss RESTEasy implementation of JAX-RS.
- Work on the design of a distributed RESTful interface, and develop it in Java as a JAX-RS service
- Dispatch HTTP requests in JAX-RS, and learn how to extract information from them
- Deploy your web services within Java Enterprise Edition using the Application class, Default Component Model, EJB Integration, Spring Integration, and JPA
- Discover several options for securing your web services
- Learn how to implement RESTful design patterns using JAX-RS
- Write RESTful clients in Java using libraries and frameworks such as java.net.URL, Apache HTTP Client, and RESTEasy Proxy
Synopsis
The RESTful approach to developing web services has become popular among web developers as a simple, lightweight alternative to the cumbersome SOAP stack. This book is among the first to show Java developers how to build RESTful services, using the JAX-RS API included in the new Java enterprise platform (J2EE 6). Thorough and complete with lots of examples and best practices, RESTful Java with JAX-RS demonstrates how to build RESTful web applications with Java that are elegant, easy to use, and easy to understand.
This is the most authoritative book you'll find on the subject. Author Bill Burke is a member of the JAX-RS expert group, which wrote the specification, and leads the project for the JBoss/RedHat implementation of JAX-RS. If you develop web services using the JAX-WS API, and want to build services with REST, RESTful Java with JAX-RS is the book you need.
Synopsis
Most Java developers will soon have the tools for building web services with the REST technology -- and this book will be the first to show them how it's done. The huge momentum REST has gained among web developers as a simple, "lightweight" method for building web services is finally affecting the Java world -- the recently developed JAX-RS Java web services API will be part of the Java enterprise platform (J2EE 6) due out in May 2009. This book is the definite guide for developers who want to develop RESTful web services with Java, complete with examples and best practices.
About the Author
Bill Burke was born in 1943 and received both his BFA and MFA in Photography from the Rhode Island School of Design. He has exhibited in solo and group exhibitions around the world, and his works are in the collections of the the International Center of Photography, The Metropolitan Museum of Art, and the Museum of Modern Art, New York; the Los Angeles County Museum of Art, the J. Paul Getty Museum, Los Angeles; the San Francisco Museum of Modern Art; the Smithsonian Institution of American Art, Washington, D.C.; the Museum of Fine Arts, Boston; the Museum of Fine Arts, Houston; and the Center for Creative Photography, Tucson; among others. Burke has received numerous honors, including five National Endowment for the Arts grants, and the John Simon Guggenheim Fellowship. Burke lives in Dorchester, Massachusetts.
Table of Contents
Foreword; Preface; Author's Note; Who Should Read This Book; How This Book Is Organized; Conventions Used in This Book; Using Code Examples; We'd Like to Hear from You; Safari® Books Online; Acknowledgments; REST and the JAX-RS Standard; Chapter 1: Introduction to REST; 1.1 REST and the Rebirth of HTTP; 1.2 RESTful Architectural Principles; 1.3 Wrapping Up; Chapter 2: Designing RESTful Services; 2.1 The Object Model; 2.2 Model the URIs; 2.3 Defining the Data Format; 2.4 Assigning HTTP Methods; 2.5 Wrapping Up; Chapter 3: Your First JAX-RS Service; 3.1 Developing a JAX-RS RESTful Service; 3.2 Deploying Our Service; 3.3 Wrapping Up; Chapter 4: HTTP Method and URI Matching; 4.1 Binding HTTP Methods; 4.2 @Path; 4.3 Subresource Locators; 4.4 Wrapping Up; Chapter 5: JAX-RS Injection; 5.1 The Basics; 5.2 @PathParam; 5.3 @MatrixParam; 5.4 @QueryParam; 5.5 @FormParam; 5.6 @HeaderParam; 5.7 @CookieParam; 5.8 Common Functionality; 5.9 Wrapping Up; Chapter 6: JAX-RS Content Handlers; 6.1 Built-in Content Marshalling; 6.2 JAXB; 6.3 Custom Marshalling; 6.4 Wrapping Up; Chapter 7: Response Codes, Complex Responses, and Exception Handling; 7.1 Default Response Codes; 7.2 Complex Responses; 7.3 Exception Handling; 7.4 Wrapping Up; Chapter 8: HTTP Content Negotiation; 8.1 Conneg Explained; 8.2 Language Negotiation; 8.3 Encoding Negotiation; 8.4 JAX-RS and Conneg; 8.5 Leveraging Content Negotiation; 8.6 Wrapping Up; Chapter 9: HATEOAS; 9.1 HATEOAS and Web Services; 9.2 HATEOAS and JAX-RS; 9.3 Wrapping Up; Chapter 10: Scaling JAX-RS Applications; 10.1 Caching; 10.2 Concurrency; 10.3 Wrapping Up; Chapter 11: Deployment and Integration; 11.1 Deployment; 11.2 Configuration; 11.3 EJB Integration; 11.4 Spring Integration; 11.5 Wrapping Up; Chapter 12: Securing JAX-RS; 12.1 Authentication; 12.2 Authorization; 12.3 Authentication and Authorization in JAX-RS; 12.4 Wrapping Up; Chapter 13: RESTful Java Clients; 13.1 java.net.URL; 13.2 Apache HttpClient; 13.3 RESTEasy Client Framework; 13.4 RESTEasy Client Proxies; 13.5 Wrapping Up; Chapter 14: JAX-RS Implementations; 14.1 Jersey; 14.2 Apache CXF; 14.3 JBoss RESTEasy; 14.4 Wrapping Up; JAX-RS Workbook; Chapter 15: Workbook Introduction; 15.1 Installing RESTEasy and the Examples; 15.2 Example Requirements and Structure; Chapter 16: Examples for Chapter 3; 16.1 Build and Run the Example Program; 16.2 Examining the Source Code; Chapter 17: Examples for Chapter 4; 17.1 Example ex04_1: HTTP Method Extension; 17.2 Example ex04_2: @Path with Expressions; 17.3 Example ex04_3: Subresource Locators; Chapter 18: Examples for Chapter 5; 18.1 Example ex05_1: Injecting URI Information; 18.2 Example ex05_2: Forms and Cookies; Chapter 19: Examples for Chapter 6; 19.1 Example ex06_1: Using JAXB; 19.2 Example ex06_2: Creating a Content Handler; Chapter 20: Examples for Chapter 7; 20.1 Example ex07_1: ExceptionMapper; Chapter 21: Examples for Chapter 8; 21.1 Example ex08_1: Conneg with JAX-RS; 21.2 Example ex08_2: Conneg via URL Patterns; Chapter 22: Examples for Chapter 9; 22.1 Example ex09_1: Atom Links; 22.2 Example ex09_2: Link Headers; Chapter 23: Examples for Chapter 10; 23.1 Example ex10_1: Caching and Concurrent Updates; Chapter 24: Examples for Chapter 11; 24.1 Example ex11_1: EJB and JAX-RS; 24.2 Example ex11_2: Spring and JAX-RS; Colophon;