www.it-ebooks.info Oracle SOA Suite 11g R1 Developer's Guide Develop Service-Oriented Architecture Solutions with the Oracle SOA Suite Antony Reynolds Matt Wright P U B L I S H I N G professional expertise distilled BIRMINGHAM - MUMBAI www.it-ebooks.info Oracle SOA Suite 11g R1 Developer's Guide Copyright © 2010 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2010 Production Reference: 1220610 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-849680-18-9 www.packtpub.com Cover Image by Sandeep Babu (sandyjb@gmail.com) www.it-ebooks.info Credits Authors Antony Reynolds Matt Wright Reviewers John Deeb Hans Forbrich Bill Hicks Marc Kelderman Manoj Neelapu ShuXuan Nie Hajo Normann Acquisition Editor James Lumsden Development Editor Swapna Verlekar Technical Editors Gauri Iyer Hyacintha D'Souza Smita Solanki Alfred John Copy Editor Leonard D'Silva Editorial Team Leader Aanchal Kumar Project Team Leader Priya Mukherji Project Coordinator Prasad Rai Proofreader Aaron Nash Indexer Hemangini Bari Graphics Geetanjali Sawant Production Coordinator Shantanu Zagade Cover Work Shantanu Zagade www.it-ebooks.info Foreword First and foremost, let me say what an honor it is to participate in the great work that Antony Reynolds and Matt Wright are doing through this Oracle SOA Suite Developer Guide. The original edition of the book provided SOA developers with practical tips, code examples, and under-the-covers knowledge of Oracle SOA Suite and has received extremely positive feedback from our developer community. This edition carries forward all of those benets, but is completely updated for the 11gR1 release of Oracle SOA Suite, which brings with it not only new features and APIs, but also some very signicant architectural changes. The original edition lled a very important need for the developer community, going beyond basic documentation to provide best practices and tips and tricks for Oracle SOA Suite developers. Antony and Matt were just the right people to create such content, each having many years hands-on experience of enabling Oracle SOA Suite implementations for customers and partners, as well as a close working relationship with Oracle's SOA engineering and product management teams. However, I believe this update for the 11gR1 release will be even more valuable to the developer community. With 11gR1, Oracle invested a tremendous amount of engineering work to not just integrate, but unify the components that make up the Oracle SOA Suite. This was done across many areas - adapters, service bus, routing, process orchestration, business rules, B2B / partner integration, business activity monitoring, and complex event processing. To achieve this unied experience, new micro-kernel based run- time architecture was created, called the Service Infrastructure, and new standards such as SCA (Service Component Architecture) were implemented. These advances bring great benets to customers around ease-of-use, manageability and scalability; however, there is naturally a learning curve with the new features and also new architectural factors that come into play. For example, architects and developers will now consider not just how to decompose their requirements into Services and Processes, but also determine what level of granularity their SOA Composites should be at. www.it-ebooks.info As such, besides the many updates and descriptions of new components, Antony and Matt have also added critically valuable new content on advanced SOA architecture considerations. I believe that this alone will make this book uniquely useful for Oracle SOA Suite developers. Especially coming so soon after the 11gR1 release, the updated content in this book, including areas such as exception handling, testing, security and operational automation, will surely be invaluable to anyone working with Oracle SOA Suite. But even more difcult to nd is the information that Matt and Antony have from working with customer implementations around edge cases, design patterns, and how these products best t into the full development lifecycle. This kind of information comes only from real-world project experience, such as Antony and Matt have. I believe that this book will help developers realize their goals with the Oracle SOA Suite, helping them increase productivity, avoid common pitfalls, and improve ROI through more scalable, agile, and re-usable implementations. On behalf of the Oracle SOA Engineering and Product Management team, as well as all the customers and partners who have asked for this book, we heartily thank Antony and Matt for the investment of their time and energy and hope that this updated edition help you achieve your goals with the Oracle SOA Suite. David Shaffer Vice President, Product Management Oracle Integration david.shaffer@oracle.com www.it-ebooks.info About the Authors Antony Reynolds has worked in the IT industry for more than 25 years, after getting a job to maintain yield calculations for a zinc smelter while still an undergraduate. After graduating from the University of Bristol with a degree in Mathematics and Computer Science he worked rst for a software house, IPL in Bath, England, before joining the travel reservations system Galileo as a development team lead. At Galileo, he was involved in the development and maintenance of workstation products before joining the architecture group. Galileo gave him the opportunity to work in Colorado and Illinois where he developed a love for the Rockies and Chicago style deep pan pizza. He joined Oracle in 1998 as a sales consultant and has worked with a number of customers in that time, including a large retail bank's Internet banking project, for which he served as the chief design authority and security architect. After the publication of his previous book, the SOA Suite 10g Developers Guide, Antony changed roles within Oracle, taking a position in the global customer support organization. As part of this change of position he moved from a small village outside Bristol, England to a small town outside Colorado Springs, Colorado. He is now acclimatized to living at 7,500ft and has learnt to survive on less oxygen. Within support, Antony deals with customers who have problems with large complex SOA deployments, often working as an advisor to other support analysts. Antony also has a role in training support analysts in SOA principles and details of the Oracle SOA Suite. Outside of work Antony helps with scouting at church, which gives him the opportunity to spend time with his two eldest sons. His wife and four children make sure that he also spends time with them, playing games, watching movies, and acting as an auxiliary taxi service. Antony is a slow but steady runner and can often be seen jogging up and down the trails in the shadow of the Rocky Mountains. www.it-ebooks.info Acknowledgement I would like to thank my wife Rowan, and my four very patient children, who have put up with my staying at home on family trips and working late nights in my basement ofce. My colleagues in support have often volunteered to be reviewers of material and have been the unwitting guinea pigs of new explanations. The reviewers have provided invaluable advice and assistance, challenging me to explain myself better and expand more on key points. Matt has been a constant source of enthusiasm and energy and with Prasad and Swapna at Packt has helped keep me to some sort of schedule. Finally, thank you to the development team at Oracle under Amlan Debnath, who have enhanced and improved the SOA Suite product signicantly in this release. I would particularly like to mention Clemens Utschig, who has expanded my understanding of SOA Suite internals and without whom Chapter 15 in particular would be much less complete. www.it-ebooks.info Matt Wright is a director at Rubicon Red, an independent consulting rm helping customers enable enterprise agility and operational excellence through the adoption of emerging technologies such as Service-Oriented Architecture (SOA), Business Process Management (BPM), and Cloud Computing. With over 20 years experience in building enterprise scale distributed systems, Matt rst became involved with SOA shortly after the initial submission of SOAP 1.1 to the W3C in 2000, and has worked with some of the early adopters of BPEL since its initial release in 2002. Since then, he has been engaged in some of the earliest SOA-based implementations across EMEA and APAC. Prior to Rubicon Red, Matt held various senior roles within Oracle, most recently as Director of Product Management for Oracle Fusion Middleware in APAC, where he was responsible for working with organizations to educate and enable them in realizing the full business benets of SOA in solving complex business problems. As a recognized authority on SOA, Matt is a regular speaker and instructor at private and public events. He also enjoys writing and publishes his own blog ( http://blog.rubiconred.com). Matt holds a B.Sc. (Eng) in Computer Science from Imperial College, University of London. www.it-ebooks.info Acknowledgement Well, this is the book that Antony and I originally intended to write, when we rst put pen to paper (or nger to keypad) back in May 2007. At this point the 11gR1 version of the Oracle SOA Suite was still in the initial stages of development, with the goal being to time the publication of the book with the release of 11gR1. Then in early 2008 Oracle announced the acquisition of BEA, which it nalized in July; at this point future timings around the release of 11gR1 were very much up in the air. By this stage a signicant amount of the book was already written, and we had received some really positive feedback from the initial reviews. With this in mind, Antony and I took the decision to retarget the book for the current 10gR3 release and bring in the Oracle Service Bus (formally known as the BEA Aqualogic Service Bus). The rst version of the book was published in March 2009, almost two years after our original start date, and much to the relief of anyone closely connected with Antony or I. Then in July, Oracle announced the release of the Oracle SOA Suite 11gR1, Antony and I blinked and then decided to write the 11gR1 version of the book, in many ways it was unnished business! So while this edition has been produced signicantly quicker, it's still almost three years since we began this journey; a journey that we would not have been able to complete without the support of many others. First, I would like to express my gratitude to everyone at Oracle who played a part; in particular to David Shaffer, Demed L'Her, Prasen Palvankar, Heidi Buelow, Manoj Das, Neil Wyse, Ralf Mueller, Mohamed Ashfar, Andy Gale and all the members of the SOA Development Team. I would also like to express my deep appreciation to everyone who has reviewed this book, the original reviewers: Phil McLaughlin, Jason Jones and James Oliver. Also the reviewers who helped with this edition: Bill Hicks, Normann Hajo, Manoj Neelapu, Hans Forbrich, Shu Xuan Nie, Marc Kelderman and John Deeb. Their invaluable feedback and advice not only helped to validate the overall accuracy of the content, but more importantly ensure its clarity and readability. www.it-ebooks.info [...]... through Oracle University and partners such as Exit Certified Although his special interests include Oracle Spatial, OracleVM, and Oracle Enterprise Linux, Hans has been particularly excited about the advances in Oracle SOA, Oracle Web Logic, and Oracle Grid Control Hans has been technical reviewer for a number of Packt books, including Mastering Oracle Scheduler in Oracle 11g Databases, Oracle 10g /11g. .. fmw_11_download.htmlofm_rcu_win_11.1.1.3.0_disk1_1of1.zip SOA Suite (11.1.1.2.0) ofm _soa_ generic_11.1.1.2.0_disk1_1of1.zip SOA Suite (11.1.1.3.0) ofm _soa_ generic_11.1.1.3.0_disk1_1of1.zip 3 Oracle Service Bus (11.1.1.3.0) http://www .oracle. com/technology/software/products/osb/index html ofm_osb_generic_11.1.1.3.0_disk1_1of1.zip 4 Oracle JDeveloper 11g (11.1.1.3.0) Studio Edition http://www .oracle. com/technology/software/products/jdev/htdocs/... introduction to the Oracle SOA Suite and its various components, and gives the reader a fast paced hands-on introduction to each of the key components in turn Chapter 1: Introduction to Oracle SOA Suite: Gives an initial introduction to the Oracle SOA Suite and its various components Chapter 2: Writing Your First Composite: Provides a hands-on introduction to writing your first SOA composite We then... reviewing SOA books ShuXuan enjoys swimming, dancing, and visiting new places Hajo Normann is SOA/ BPM architect at HP Enterprise Services since 2005 He helps motivating, designing, and implementing integration solutions using Oracle SOA Suite and BPA Suite (a BPM-ready version of ARIS from IDS Scheer) and works on SOA/ BPM principles, design guidelines, and best practices Since 2007, Hajo is the Oracle. .. Service-Oriented Architecture (SOA) , where the IT infrastructure is continuously adapted to keep up with the pace of business change Oracle is at the forefront of this vision, with the Oracle SOA Suite providing the most comprehensive, proven, and integrated tool kit for building SOA based applications This is no idle boast Oracle Fusion Applications (the re-implementation of Oracle' s E-Business Suite, Siebel, PeopleSoft... to Thomas Erl's book SOA Design Patterns and are giving whole day advanced SOA workshops on conferences Websites: http://hajonormann.wordpress.com/, http://soacommunity.com/ www.it-ebooks.info www.it-ebooks.info Table of Contents Preface 1 Part 1: Getting Started Chapter 1: Introduction to Oracle SOA Suite Service-oriented architecture in short Service Orientation Architecture Why SOA is different Terminology... the largest composite application being built today and it has the Oracle SOA platform at its core Developers and Architects using the Oracle SOA Suite, whether working on integration projects, building new bespoke applications or specializing in large implementations of Oracle Applications will need a book that provides a "hands on" guide on how best to harness and apply this technology, this book... Processing – CEP Event delivery network SOA Suite architecture Top level Component view Implementation view A recursive example JDeveloper Other components Service repository and registry 24 24 24 24 25 25 26 27 27 27 28 The BPM Suite Portals and WebCenter Enterprise manager SOA management pack Summary 28 29 29 BPA Suite Chapter 2: Writing your First Composite Installing SOA Suite Writing your first BPEL process... Decision Points: Covers the new Rules Editor in 11gR1, including Decision Tables and how we can incorporate rules as decision points within a BPEL Process Chapter 8: Using Business Events: Introduces the Event Delivery Network (EDN), a key new component in Oracle SOA Suite 11g that provides a declarative way to generate and consume business events within your SOA infrastructure Chapter 9: Building Real-time... Including version identifiers in the WSDL definition Managing the service lifecycle Summary Chapter 12: Building Entity Services Using Service Data Objects (SDOs) Service Data Objects Oracle 11g R1 support for SDO Oracle SOA Suite 11g SDO support Implementing a Service Data Object Overview of ADF Business Components Creating our ListingSDO application Creating our Listing Business Components Defining Entity . www.it-ebooks.info Oracle SOA Suite 11g R1 Developer's Guide Develop Service-Oriented Architecture Solutions with the Oracle SOA Suite Antony Reynolds Matt. or I. Then in July, Oracle announced the release of the Oracle SOA Suite 11gR1, Antony and I blinked and then decided to write the 11gR1 version of the