Getting Started With Oracle SOA Suite 11g R1 - A Hands-On Tutorial - L'Her Demed - E-Book

Getting Started With Oracle SOA Suite 11g R1 - A Hands-On Tutorial E-Book

L'Her Demed

0,0
31,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

In Detail

Accelerate your learning path to Oracle SOA Suite 11g with this easy-to-use and comprehensive hands-on tutorial. This tutorial is built upon proven training content that has been acclaimed by hundreds of developers at SOA Suite 11g rollout training courses.

Getting Started With Oracle SOA Suite 11g walks you through the development of a services-oriented composite application based on a real-life scenario. The solution is built in an iterative fashion, with each chapter introducing new features one by one. This fully illustrated step-by-step tutorial is based on proven training content that has been praised by hundreds of developers in product training courses forming the SOA Suite 11g rollout.

SOA has evolved from being a buzzword into a mature technology, and is now used in mission-critical systems all around the world. With Oracle SOA Suite 11g, Oracle provides a complete, integrated, standards-based and best-of-breed solution to build and manage large, highly demanding SOA projects.

The book starts by introducing key SOA concepts, and emerging standards such as Service Component Architecture (SCA), that are key to understanding Oracle SOA Suite 11g. The remainder of the book, written in the form of a tutorial, will quickly guide new and experienced developers through the complete breadth of features and components offered by Oracle SOA Suite 11g. This tutorial is modular, and you will learn how to build a services-oriented composite application project iteratively with each chapter introducing new technology components and adding a functional increment. Ready-to-deploy solutions are provided for each and every step, so developers can jump into the tutorial at any point in the book, beginning with the solution for the previous chapter. Chapter instructions are written at three levels of complexity: detailed step by step instructions for the newbie, high level functional and design notes for those who want the challenge of building without the details, and a quick-build list of objects for experienced users who just want to build the application.

Learn from the experts - teach yourself Oracle SOA Suite 11g through an accelerated, hands-on learning experience

Approach

This fully illustrated step-by-step tutorial is based on proven training material that has been highly praised by hundreds of developers in product training courses given as part of the SOA Suite 11g rollout. You will learn how to build a services-oriented composite application project iteratively with each chapter introducing new technology components and adding a functional increment. Each chapter comes with a working solution for your reference. You can use the solution to start the tutorial at any point or to jump around to the chapters that most interest you.

Who this book is for

This clear and detailed tutorial is perfect for both new and experienced SOA developers looking for a pragmatic and hands-on approach to learning Oracle SOA Suite 11g.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 379

Veröffentlichungsjahr: 2009

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Getting Started with Oracle SOA Suite 11g R1 – A Hands-On Tutorial
Credits
Foreword
About the Authors
Acknowledgment
Preface
What this book covers
Who this book is for
Conventions
Reader feedback
Blog
Customer support
Downloading the example code for the book
Errata
Piracy
Questions
1. SOA and Its Evolution
SOA and services—what and why
SOA—past, present, and future
Composition, SCA, and service platform
Summary
2. Product Architecture
Oracle SOA Suite 11g: Release drivers
Challenges solved by Oracle SOA Suite 11g
Simplifying the design-time environment
Composite Editor to assemble heterogeneous technologies
Streamlining life cycle management
Metadata Storage (MDS) for tighter control and governance
Event-Delivery Network (EDN) to reconcile Event-Driven and Service-Oriented Architectures
Unifying runtimes for performance and simplified deployment
Removing inefficiencies through the Service Infrastructure
Eliminating redundancies by sharing components
Simplifying installation and deployment
Increasing visibility and streamlining management
Enterprise Manager for end-to-end monitoring
Global, policy-driven security
Exception handling
Summary of the Oracle SOA Suite 11g components
3. The Tutorial Project: Purchase Order Processing
Structure of the tutorial
Tutorial scenario
Overview of the tutorial chapters
Tutorial files
Documentation
4. Product Installation
Checking your installation
What you will need and where to get it
Memory and Disk Space requirements
Downloading files
Checking your database
Checking your browser
Checking your JDK
Installing Admin Server and Managed Servers
Installing WebLogic Server
Dropping the existing schema
Configuring schema
Installing SOA
Creating Domain
Installing JDeveloper and SOA Composite Editor
Installing JDeveloper
Updating JDeveloper with latest SOA
Additional actions
Setting memory limits
Starting and stopping
Starting
Console URLs
Stopping servers
WebLogic Server console settings
EM settings for development
If you need to uninstall JDeveloper and servers
Configuration
Installing the database schema
Creating the JMS resources
Creating the database resource
Testing your installation
Oracle Service Bus installation
Testing your OSB installation
Removing samples (optional)
Uninstalling OSB
Summary
5. Basic components: Web Services Binding, Mediator, and Database Adapter
Introducing the basic components
Tutorial: Building the credit card validation service
Overview
Designing the flow
Creating a new application and project
Adding the Database Adapter
Adding the Mediator component
Adding the Web Service binding
Adding a transformation to the Mediator component
Deploying and testing the composite application
Creating a server connection in JDeveloper
Deploying Composites to the Application Server
Testing your composite using Enterprise Manager
Summary
Quick-build instructions
6. Accessing Files Using the File Adapter
Introducing the File Adapter
Tutorial: Building the purchase order routing service
Designing the flow
Creating a new application
Adding the service interface
Adding the routing component
Adding the File Adapter
Wiring the components together and adding a transformation
Deploying the application
Testing the application
Summary
Quick-build Instructions
7. Creating Processes Using Business Process Execution Language (BPEL)
Introducing BPEL
Long-running services
BPEL language
BPEL Editor
Tutorial: Orchestration of credit card validation service in POProcessing
Designing the flow
Invoking the CreditCardStatus service
Designing the BPEL approval process
Modifying the Mediator component
Deploying the application
Testing the application
Modifying the application for small orders
Summary
Quick-build Instructions
8. Creating Human Tasks
Introducing the Human Task component
Functional details
Human Workflow Service
Worklist application
Tutorial: Adding Manual Approval in PO Processing
Designing the flow
Adding a Human Task to the composite
Calling the Human Task from BPEL
Creating the task form for task details
Deploying and testing the application
Summary
Quick-build Instructions
9. Business Rules
Introducing Business Rules decision service
Rules design
Tutorial: Adding an approval rule using the decision service in POProcessing
Designing the flow
Adding a Business Rule to POProcessing
Deploying POProcessing composite
Running the application
Quick-build instructions
Introducing Business Rules decision table
Designing the flow
Adding a BPEL Process and a Business Rule
Defining the Business Rule
Defining the BPEL process
Invoking FulfillmentProcess
Deploying the application
Testing the application
Quick-build Instructions
Summary
10. Using the JMS Adapter
Introducing the JMS Adapter
WebLogic JMS
JMS Adapter
Tutorial: Orchestration of JMS services in the fulfillment process
Adding the JMS adapters to the composite
Invoking the services from BPEL
Deploying the application
Testing the application
Summary
Quick-build Instructions
11. Reusing and Virtualizing Services with Oracle Service Bus
Introducing Oracle Service Bus
What are the types of changes that OSB can absorb?
Who are the users?
OSB terminology: Business services and proxies
What about governance and discovery?
OSB for Financial Services
Tutorial: Virtualization of services
Designing the flow
Creating the project and importing resources
Configuring Business Service
Configuring the Proxy
Configuring Message Flow
Re-wiring POProcessing composite
Testing the end-to-end application
Summary
Quick-build Instructions
12. Exploring Application Life Cycle Management
Introducing life cycle management features
Tutorial: Solution deployment
Development environment approach
Surfacing binding properties at the composite level
Generating and modifying a configuration plan
Test environment approach
Compiling and packaging from the command line with ANT
Deploying from the command line with ANT
Production environment approach
Deploying from Enterprise Manager
Summary
Quick-build Instructions
13. Unit-testing the Composite Application
Introducing the built-in testing framework
Tutorial: Automated unit testing
Creating the unit test
Setting the inbound message
Setting the simulated message
Setting the assertion for success
Setting the assertion for failure
Testing the application
Summary
Quick-build instructions
14. Adding Exception Handling
Introducing exception handling
System faults
Business faults
Exception handling in Oracle SOA Suite 11g
Exception-handling strategies
Policy-based fault-handling framework
Defining a policy
Binding a policy
Tutorial: Fault handling and fault policies
Handling remote faults
Testing service unavailability
Creating a fault policy
Handling exceptions in BPEL
Using a custom Java fault handler
Handling Mediator faults
Summary
Quick-build Instructions
15. Securing Services
Introducing security policy management
Securing your composites using Oracle Web Services Manager
Identity management
Use SSL
A quick look at the policy management UI
Tutorial: Securing the credit card validation service
Defining a new user
Attaching the policies
Detaching policies
Attaching and detaching policies in JDeveloper
Summary
Quick-build Instructions
16. Gaining Visibility into Your Process Activities
Introducing Business Activity Monitoring (BAM)
Oracle BAM Server
Oracle BAM Web Application
Tutorial: Monitoring Business Activity in PO Processing
Defining the data object
Defining the BAM dashboard
Configuring BAM Adapter on Weblogic Server
Adding a BAM connection to POProcessing
Adding a BAM Adapter to POProcessing
Modifying the Mediator component
Testing the adapter connection
Adding BAM sensors to the BPEL process
Deploying and running the composite
Summary
Quick-build Instructions
17. Event Delivery Network
Introducing events
Creating and managing event definitions
Consuming events from the Event Delivery Network
Tutorial: Use of Event Delivery Network (EDN) and POProcessing
Modifying the composite to consume events
Defining the event
Subscribing to the NewPO event
Deploying and testing
Summary
Quick-build Instructions
18. Data Handling with Service Data Objects (SDO)
Introduction to Service Data Objects
Key components
Oracle SOA Suite 11g SDO Support
Tutorial: Using a Service Data Object
Preparing for the lab
Creating the ADF Business Component service
ADF Business Components, a quick primer
Creating an ADF-BC application
Creating the Business Components
Testing the application module
Creating the service interface
Deploying the service
Testing the Customer SDO service
Using the new ADF-BC Service in the POProcessing composite
Adding the CustomerSDOService as a reference
Using the SDO in BPEL
Deploying and Testing
Summary
Quick-build Instructions
19. Connecting to Trading Partners (B2B)
Introducing B2B integration
B2B characteristics
Oracle B2B
Composites and B2B
Document management
Challenges due to evolving standards
EDI is not XML
Trading partner profiles and agreement
Tutorial: Triggering POProcessing using B2B transactions
Defining the B2B configuration
Creating a document definition
Defining the trading partners
Creating a listening channel
Creating an agreement
Creating the composite: B2Bprocessing
Testing the process
Summary
Quick-build Instructions
20. Concluding Remarks
Index

Getting Started with Oracle SOA Suite 11g R1 – A Hands-On Tutorial

Prasen Palvankar

Jayaram Kasi

Manas Deb

Heidi Buelow

Demed L’Her

Getting Started with Oracle SOA Suite 11g R1 – A Hands-On Tutorial

Copyright © 2009 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: September 2009

Production Reference: 1230909

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-847199-78-2

www.packtpub.com

Cover Image by Parag Kadam (<[email protected]>)

Credits

Authors

Heidi Buelow

Manas Deb

Jayaram Kasi

Demed L'Her

Prasen Palvankar

Acquisition Editor

James Lumsden

Technical Editor

Aanchal Kumar

Indexer

Hemangini Bari

Editorial Team Leader

Abhijeet Deobhakta

Proofreader

Chris Smith

Graphics

Nilesh Mohite

Production Coordinator

Dolly Dasilva

Cover Work

Dolly Dasilva

Foreword

On July 1, 2009 Oracle announced the 11gR1 release of Fusion Middleware of which SOA Suite is a key part. Service-oriented architecture (SOA), business process management (BPM), event-driven architecture (EDA), and related technologies are at the heart of modern enterprise software solutions aimed at providing greater business agility and adaptability. So far SOA and BPM enabling tools have focused mainly on modularizing applications and IT functionalities using services encapsulation, leaving a major gap when it comes to composing real-life business applications from them and managing their entire life cycle. SOA Suite 11g fills this gap in the context of services, processes, and events, as does the entire Fusion Middleware platform in a broader middleware context.

With Fusion Middleware 11g release, Oracle continues to extend the guiding principles behind its Fusion products: complete, integrated, open, and best-of-breed. Specifically, for SOA Suite 11g this amounts to a unified platform with all the tools that are necessary to work with services, processes, and events, from conception through development and deployment to operational and change management so as to provide very high developer productivity and operational ease. This also means that all SOA Suite components continue to be based on industry standards, remain hot-pluggable to provide best-in-the-industry interoperability in heterogeneous technology environments, and while the SOA Suite components are well integrated, each of them continues to lead the market in its features and performance. Keeping the goal of enablement of business excellence in mind, SOA Suite 11g has been designed to help produce business applications quickly and run them efficiently, adapt these applications easily when business changes demand, manage and monitor these applications, and drastically reduce the gaps in business-IT interactions.

BPM, SOA, and integration solutions involve connection to applications, services, system-level automation, human workflows, document-processing workflows, business rules, and B2B. They also involve security policies, exception handling, and mediation of service requests. These applications are often deployed as distributed applications. To get the maximum productivity and value from these integration solution projects, in addition to a good product, you need a good understanding of the applicable software tools. To help you in understanding the tools better, the SOA Suite product management team has put together this getting-started tutorial.

The authors have had first-hand experience in creating, delivering, and rolling-out SOA Suite 11gR1 training programs internally and externally to partners and customers. This book takes a divide-and-conquer approach and builds up a non-trivial service-oriented composite application in a step-by-step fashion so that it is easy for the reader to follow and appreciate the workings of the SOA Suite product. If your goal is to exploit SOA and related paradigms to deliver business value quickly, this book will put you on the right track. SOA Suite 11g is a result of a lot of careful design and hard work by one of the best software product teams in the industry. It is a best-in-class product and I hope that you will enjoy working with it.

Amlan Debnath

Senior Vice President,

Product Development

Oracle Corporation

About the Authors

Heidi Buelow is a product manager with Oracle and is responsible for Oracle SOA Suite programs such as beta and technical previews. Heidi joined Oracle in 2006, after having spent the previous 10 years as Chief Application Architect with a startup developing a Business Process Management engine, developer toolset, and application framework. Heidi started her career as a software developer at Xerox, working on the Xerox Network Services and Star Workstation products where she first learned to appreciate object-oriented and services-oriented technologies. She holds a Bachelor of Science degree in Computer Science from the University of Southern California.

Manas Deb is a senior director in the Fusion Middleware/SOA, BPM, Governance Suites Product Group at Oracle HQ. He currently leads outbound product management and many strategic engagement initiatives for Oracle's SOA, BPM, and Governance solutions, worldwide. He is also responsible for Oracle/HQ-based SOA Methodology initiatives. Manas has worked in the software industry for over twenty years, most of which was spent in software product management/marketing and on architecting; he has also led a wide variety of enterprise-level application development and business integration projects in a wide variety of industries. A graduate of the Indian Institute of Technology (KGP), Manas attended post-graduate studies at the University of Texas at Austin. He received his PhD in an inter-disciplinary program comprising Computer Science, Applied Mathematics, and Engineering. Manas also has an MBA with specialization in international business.

Jayaram Kasi is a product manager with Oracle, and focuses on SOA technologies. Before that, he had been a software architect for 20 years working on relational database kernels at HP, OLTP monitors based on DCE at HP, High Availability at HP, ECommerce Infrastructure at Commerce One, and Enterprise Service Bus at BEA. Jayaram has a Bachelor of Science degree in electrical engineering from the Indian Institute of Technology, and a Master of Science in electrical engineering from the University of Hawaii.

Demed L'Her is Director of Product Management at Oracle, where he is responsible for the Oracle SOA Suite. He has been with Oracle since 2006, focusing on ESB, JMS, and next-generation SOA platforms. Before joining Oracle, Demed spent eight years with TIBCO Software, a pioneer in electronic trading, message-oriented middleware, and enterprise integration. He has been involved in some of the largest messaging and integration projects around the world, from trading floors in Tokyo to semiconductor manufacturing fabs in Arizona. Demed holds an Engineering Degree from the Ecole Nationale Supérieure des Télécommunications de Bretagne, a Bachelor of Science in Electrical Engineering from Université de Bretagne Occidentale and a Master of Science in Computer Science from Université de Rennes I.

Prasen Palvankar is a Director of Product Management at Oracle and is responsible for providing strategic support to Oracle's SOA Suite current and prospective customers. He is also responsible for outbound SOA Suite product-related activities, including field and partner enablement and training. Prasen has over 20 years of experience in software development and has been working for Oracle since 1998. He was a Technical Director in the Advanced Technology Solutions group at Oracle Consulting, delivering large-scale integration projects before taking on his current role four years ago. Before joining Oracle, Prasen worked as a Principal Software Engineer at Digital Equipment Corporation.

Acknowledgment

The authors would like to thank the Oracle SOA Suite 11g development and product management teams, and the leadership team of David Shaffer, Amlan Debnath, Hasan Rizvi, and Thomas Kurian for their vision, strategy, and creation of the industry-leading SOA and process-enabling software suite that was used in this book. The work presented here has substantially benefited from the input and feedback of many, including members of the business integration software product management group, nearly a thousand training attendees within and outside of Oracle, and the instructors who delivered the training to them. We would like to mention specifically the direct contributions of Deb Ayers, Jeff Hutchins, Mihai Munteanu, and Lloyd Williams who provided some of the lab content. In addition, we would like to thankfully acknowledge the help received from Sheila Cepero and Todd Adler in handling all the necessary legal steps within Oracle associated with the publishing of this book.

The publishing team at Packt Publishing was wonderful to work with—the enthusiasm, promptness, and guidance of James Lumsden and Aanchal Kumar throughout the evolution of this book are particularly worthy of mention.

And, finally, we would expressly like to thank our families for their love and support as we took on the challenge of putting this book together on top of our already very busy schedules and borrowed heavily from the invaluable family time.

Thank you for purchasing this Oracle SOA Suite 11g R1 tutorial.

New versions of SOA Suite 11g are in the pipeline, and due for release in the foreseeable future.

Accordingly, Packt would like to offer you complimentary eBook upgrades for the R2 and R3 editions of this tutorial. Packt eBooks come in PDF format, can be printed, and are now copy-paste enabled.

To qualify for this offer, please email <[email protected]> quoting the retailer you bought the book from, and the invoice number.

Packt will then contact you and explain the next step. Don't worry, it's all quick and painless.

For those of you who bought this book directly from Packt, you need do nothing. We will automatically contact you when the next version of the book is available, and advise you how to download your free eBook.

Preface

As the concept of Service-Oriented Architecture has matured, it has triggered the emergence of new, sophisticated, and specialized tools: Enterprise Service Buses (ESB) for service virtualization, BPEL for orchestration, Human Workflow, Business Rules for externalizing key pieces of logic, and so on. As a result, developers now have a rich set of tools to work with. However, this can itself present a challenge: how can one keep up with all these various tools and their capabilities? One of the key goals of Oracle SOA Suite 11g is to assemble these tools in a cohesive, simple-to-use, and highly-integrated development environment. This book, organized around a tutorial that is built in an iterative fashion, will guide you through all the components of the suite and how they relate to each other.

The authors are part of the Oracle SOA Suite product management team, and the idea of the book came as we were delivering an earlier version of this material, as an accelerated internal training at Oracle—before the product was even released. These training sessions were very well received and we decided it was worth sharing this material with a larger audience.

This book is not meant to be used as reference material—it is an accelerated learning path to the Oracle SOA Suite. The focus is on breadth rather than on depth. More specifically, we wanted to highlight the key capabilities and role of each product in the Oracle SOA Suite and explain how they can be put to work together to deliver highly capable and flexible applications. Too often we, as developers, tend to stretch the limits of (not to say abuse!) a few technologies, simply to stay within our comfort zone—and because there is always so little time to learn new things. With its streamlined format, we hope this book will give you the confidence to further explore some of these technologies you had never looked at before.

What this book covers

The principal aim of this book is to get you operational with Oracle SOA Suite 11gR1 quickly and easily. In this spirit, the largest part of this book is dedicated towards a set of hands-on step-by-step tutorials that build a non-trivial SOA composite that you can deploy, test, run, monitor, and manage.

Chapter 1 starts the book off with a quick refresher on some of the useful concepts regarding SOA and services and concludes with an introduction to Service Component Architecture (SCA).

Chapter 2 discusses the key challenges in the technical implementation of SOA-based applications and how Oracle SOA Suite 11g leverages SCA principles to address these challenges.

Chapter 3 describes the business and technical requirements for a purchase order (PO) processing composite and gives you an overview of how the complete solution will be built up in a set of discrete steps using a series of tutorials using Oracle SOA Suite 11gR1.

Chapter 4 gives you the necessary instructions for download, installation, and configuration of Oracle SOA Suite 11gR1.

The core functionalities of the PO processing composite that is described in Chapter 3 are built in Chapters 5 through 10. This series of chapters will teach you the basics of working with Oracle SOA Suite 11g and the IDE (JDeveloper).

You start building the composite using a mediator, as well as web services and database adapters. You then add a file adapter and a BPEL (Business Process Execution Language) component to create a process that orchestrates the overall flow, adding human interaction, creating conditional process execution using business rules, and accessing external services via a JMS (Java Message Service) adapter. At the end of each and every chapter, you will have a composite that can be deployed, run, and tested. You are advised to go through these tutorial chapters, 5-10 in a sequential manner.

The tutorials in Chapters 11 through 19 let you add more functionality to the composite and explore some of the operational features of Oracle SOA Suite 11gR1. You will learn service re-use and virtualization using Oracle Service Bus (OSB), explore some of the composite life cycle management features, test the composite using the unit testing framework, incorporate exception handling, add security policies to a service, set up a business activity-level tracking of the composite transactions using Oracle Business Activity Monitoring (BAM), work with events using the unified services and events platform of Oracle SOA Suite 11g, handle data using Service Data Object (SDO) specification, and connect the composite to a Business-to-Business (B2B) gateway using Oracle B2B.

By the end of Chapter 19, you should have a good grasp of all components in Oracle SOA Suite 11gR1, and be able to create modular, full-featured service composites. The concluding remarks in Chapter 20 will briefly discuss some of the ways you could use such composites to provide business benefits.

Who this book is for

This book is intended for any SOA developer or architect, with some basic understanding of Service-Oriented Architectures and web services technologies. No prior knowledge of Oracle middleware is assumed. However, people with experience with SOA Suite 10g will find this material of interest as well because of its focus on how things work together, an area that has been greatly enhanced with the 11g release.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Each schema can reference definitions in other schemas by making use of the xsd:import directive."

A block of code will be set as follows:

<types> <schema xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://xmlns.oracle.com/Echo" schemaLocation="Echo.xsd"/> </schema> </types>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items will be made bold:

<types> <schema xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://xmlns.oracle.com/Echo" schemaLocation="Echo.xsd"/> </schema> </types>

New terms and important words are introduced in a bold-type font. Words that you see on the screen, in menus or dialog boxes for example, appear in our text like this: "Double-click on the Case bar and set the name to USPS".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to <[email protected]>, making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Blog

The authors are contributing to a blog that you might want to consult for updates, additional samples, and information about Oracle SOA Suite. The blog can be found at: http://blogs.oracle.com/soa.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for the book

Visit http://www.oracle.com/technology/products/soa/soasuite/11gthebook.html to directly download the example code.

Note

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide the location address or website name immediately so we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with some aspect of the book, and we will do our best to address it.

Chapter 1. SOA and Its Evolution

Service-Oriented Architecture (SOA) is fundamentally a loosely coupled computing paradigm and has become a key ingredient of modern business applications and IT infrastructure. Now accepted quite widely by user communities and heavily backed by major software vendors such as Oracle, IBM, SAP, and Microsoft, SOA tools and practices are maturing fast. Since this book is focused on teaching how to use a SOA-enabling tool set, and not on deep exploration of SOA philosophies and methodologies, we will only briefly go over some of the essential aspects of SOA in a refresher style so as to provide you with a reasonable context. Much of the content in this chapter will serve as general background information on SOA and can be useful for overall practice of SOA. In what is to follow, we touch upon what SOA and its essential constituent services are, and why one should one even bother about SOA. We recount how the basics of SOA have evolved and the direction it is headed. We conclude the chapter with an introductory treatise on Service Component Architecture (SCA), as familiarity with SCA concepts is helpful in appreciating the workings of Oracle SOA Suite 11g tool set.

SOA and services—what and why

SOA is an architectural framework for software design that works around the concept of services. In our day-to-day life, we take the concept of services as a given: if we are sick, we seek the service of a doctor, if a faucet is leaking in our home, we rely on a plumber's service to get that fixed, our children's education depends on the services of teachers, and so on. While services span nearly all the things imaginable, they exhibit a rather simple interaction pattern. When a consumer makes a request to the provider for something to be done, the provider provides a service by executing that request. At a high level, services in SOA would be quite similar to those in our daily lives. Of course, in SOA, the consumers and providers would be some computer applications and the service would be a suitable unit of business or technical functionality that is digitally accomplished. SOA is about working with such services. It is the architectural component of a bigger philosophy, the so-called service orientation, and its adoption has a multi-fold impact on an organization in the way it builds and leverages IT assets for ultimate business benefit. SOA impacts, for example:

Application architecture: The way services are used (consumed) by other applications such as business processes or integration processes or portals.Enterprise architecture: The embellishment of standard enterprise architecture by components specific to handling and management of services, for example, service orchestrator for composition of business processes or composite applications using services, service bus for service request mediation and protocol and format translations, service portfolios, and repositories for service asset management, service repositories, and registries for service look-ups, service security, policy, and quality-of-service management components, and so on. (The following figure shows some of the essential elements of SOA.)Business architecture: The way a business's activities are to be organized or modified in order to implement and best leverage SOA.Organizational architecture: The organization roles, responsibilities, and governance as they pertain to SOA-related activities.

For a successful SOA adoption, you need to attend to each of the above aspects, which are not all technology related. This is the reason why you may hear remarks like "SOA is not only technology" or "You cannot buy SOA off-the-shelf". While we acknowledge this comprehensive approach to successful SOA adoption, and Oracle's SOA Methodology delves into details of how SOA may be adopted in a comprehensive manner, in this book, we have chosen to keep our focus on the implementation aspects of SOA solutions.

Note

SOA definitions: Over the years, many definitions have been proposed for SOA. These definitions are similar in many aspects but have some differences. As an example, we offer two such definitions:

Per Gartner, "Service Oriented Architecture (SOA) is a client-server software design approach in which an application consists of software services and software service consumers (also known as clients or service requesters). SOA differs from the more general client/server model in its definitive emphasis in loose coupling between software components, and in its use of separately standing interfaces."

Per Object Management Group's SOA Special Interest Group, "Service Oriented Architecture is an architecture style for a community of providers and consumers of services to achieve mutual value that (i) allows participants in the communities to work together with minimal co-dependence or technology dependence, (ii) specifies the contracts to which organizations, people and technologies must adhere in order to participate in the community, (iii) provides for business value and business processes to be realized by the community, and (iv) allows for a variety of technology to be used to facilitate interactions within the community."

The following figure shows the key focus areas for a comprehensive and successful SOA adoption:

A service in SOA is basically an encapsulation of data and business logic. A service consists of an interface, has an implementation, and exhibits certain pre-defined behavior. The service interface defines a set of operations, which portrays its capabilities; operations are the things that a service can do. The provider of the service offers one or more contracts based on the interface and behavior details, and is responsible for creating a service implementation capable of fulfilling such contract(s). The consumer of the service is only concerned with the contract for use of this service. The service functionalities may be derived from diverse sources, for example, databases, legacy applications, packaged enterprise applications, or bespoke applications developed in traditional programming environments like C/C++, Java, or .Net. Mature technologies and tools exist today that can easily package and expose these functionalities as services. A wide variety of service consumers are possible, for example, composite applications, user interaction modules, or business-to-business gateways. Service and IT infrastructures bridge service consumers and the providers and provide mechanisms to apply adequate security and other policies (see the following figure for a high-level SOA Reference Architecture schematic, ref. Oracle SOA Methodology).

It is worthwhile to point out that the concept of service packaging is quite general. A service can utilize other services along with suitable composition mechanism, for example, using declarative orchestration or some procedural code.

Services are often classified, that is, type designations are assigned to services, in order to be able to specify best practices for their implementation and management. There are many strategies for service classification. One classification approach relies on what the service encapsulates, and accordingly we have (adapted from: SOA Principles of Service Design by Thomas Erl, Prentice Hall):

Entity services: These services package corporate/business entities such as customer, account, employee, contract, and so on, and provide access to underlying data elements via the basic data access operations like create, read, update, and delete, collectively called the CRUD operations, plus a few others and some logic calculations based on the attributes of the entity. Entity services are generally business process agnostic, for example, data services providing access to data in packaged applications.Task services: These services perform a portion or all of some business process or activity and in turn may access functionalities of various entity or other task services. A payment update action involving updates to several entities such as customer and account is an example of a task service. Task services often represent sub-processes of higher-level business processes.Utility services: These are helper services to entity and task services providing connectivity to applications (for example, connector services), access to security infrastructure (for example, directory services), or other generic utilitarian activities like logging.

Utility services are typically technical or infrastructural in nature while entity and task services usually carry business semantics. Utility and entity services are, generally speaking, more reusable than task services.

Note

As a general rule, when scoping capabilities of services, do not mix business process/application specific and agnostic functionalities—doing so is likely to hinder re-use and composability of services.

The key business expectations for service orientation (and SOA), in fact the main reasons why this paradigm has been gaining such increased attention in recent years, can be summarized as:

Cost reduction for IT application development via service reuse, and for IT operations via well-defined services-based operations layersIncreased business agility, that is, reduction in time-to-market of a company's offering by speeding up creation of new or modification of existing IT applications and business processes by composing and assembling applications from existing assets as opposed to building from scratchChange resilience, that is, ability of higher-level applications and processes to remain insulated from changes in lower or backend applications, for example, a customer order management process not being affected by the introduction of a new order fulfillment systemContinuous improvement of operations via improvements in performance of services and Service Level Agreements (SLAs) without disrupting business operationsBetter communication between business and IT using business-oriented service specifications thus reducing the so-called business-IT gap

In order to achieve the above business benefits, SOA implementations and services therein must follow certain essential disciplines:

Loose coupling: Consumers refer to service contracts in order to use services and not their implementations thus reducing the level of dependency between consumers and providers.Discoverability:Services should be self described and be published into services registries and repositories so as to facilitate design-time searches and runtime look-ups.Location transparency: This refers to the ability of a service consumer to be able to invoke a service regardless of its actual location in the network; this also assumes the discoverability property (described above) and that the consumer has the right to access the service. Often, the idea of service virtualization, where the consumer simply calls a logical service while a suitable SOA-enabling runtime infrastructure component, commonly a service bus, maps this logical service call to a physical service, also relates to location transparency.Autonomy: Services, within the bounds of their contracts that they make with their resource providers and contracts that they offer to their consumers, need to be self-contained as far as their execution is concerned; this implies that services must manage their own dependencies on other services or contributing applications.State management: Services need to handle their own state management per their contract. While it is highly desirable that services be stateless, stateful implementations may be unavoidable in certain cases.Reusability: A service should package information and business logic in a manner that, where and when applicable, multiple consumers should be able to use it as a shared resource either directly or via composition.Composability: Services should be easily composable from other services and technical functionalities, and should be able to participate easily in other higher-level functionalities, such as a composite service or a composite business application.

Some of the statements above have been influenced by a recent multi-part discussion series, Evolution of principles of Service Orientation by Michael Poulin (see: http://www.ebizq.net/blogs/service_oriented/2009/02/evolution_of_principles_of_service_orientation_part_1.php) on SOA principles described in Thomas Erl's books on SOA.

It should be pointed out that the above properties, while quite distinct in their own right, are not always mutually exclusive. Also, when making design considerations for a service, business requirement-driven pragmatic trade-offs that prioritize importance of these properties can be expected. Note also that if a composite application is built out of component services and other functionalities like business rules, and so on, with the intention of packaging and exposing this application as a service, then this composite application becomes subject to the above set of disciplines.

Tip

The ability of an organization to follow SOA disciplines routinely depends on the SOA maturity of the organization. Based on its business needs, and by following a suitable SOA maturity model, an organization can create an SOA adoption roadmap to attain higher SOA maturity over a period of time.

Services are like mini applications and have distinct life cycle stages and corresponding owners. Usually triggered by some business or operational requirement, candidate services are put forth, some of which then, via an appropriate governance process, may be selected for implementation. A candidate service that is targeted for implementation will go through the usual life cycle stages of analysis and design before building, testing, and deployment. However, services, much like applications, are versioned. Versioning can be quite a useful strategy in managing evolution of services and in limiting the unwanted impact of changes introduced in the services. New service versions are released as additional capabilities are added in order to accommodate the needs of newer service consumers. SOA providers would support multiple service versions simultaneously, just like commercial packaged applications, and existing consumers using older versions of the services would be able to continue operating without being forced to change over to the latest version.

SOA—past, present, and future

There is no doubt that businesses have benefited from information technologies and have moved into the so-called digital age. Still, there are some commonly prevailing complaints: "IT is too complex", "IT is too expensive", and "IT is too slow". The main reason for increased attention to SOA these days is the expectation that by exposing and leveraging the existing IT assets as services, SOA will help simplify IT applications development and operations, and will help businesses gain significant cost advantages and agility. Interestingly, SOA is not the first time that the industry tried to enhance the business benefit of IT.

Note

Alexander Pasik of Gartrner coined the term "SOA" in 1994. Yefim B. Natis and Roy W. Schulte of Gartner published the first report on SOA in 1996.

Elements of the SOA paradigm have been in the making for nearly three decades. The present day service-oriented computing has its roots in computing models like modular programming, client-server computing, object-oriented programming, component-based and model-based developments, and in distributed computing technologies like Distributed Computing Environment with remote procedure calls and Distributed File Systems (DCE/RPC/DFS), Message-Oriented Middleware (MOM), Object Request Brokers (ORBs). Contemporary SOA also leverages tremendous advancements of the last decade in LAN- and WAN-based computing and in the Internet technologies.

Unlike many of the technologies of the past, modern SOA utilizes technology and vendor neutral standards like XML, HTTP, and Web Services (WS-*) that are heavily backed by all leading software vendors. This has now led to a much stronger acceptance of SOA as compared to similar technologies and styles that preceded it. With the introduction of Enterprise Service Bus (ESB) products, it has become much easier to mediate service requests and to build shared services infrastructure layers on top of IT assets. These service infrastructure layers can effectively support higher-level composite applications like business processes and portals while insulating them from changes below the service layer, and thus facilitating application rationalization and legacy modernization.

Note

Simple Object Access Protocol (SOAP) based Web Services (WS) have gained major popularity in SOA implementation, and this book follows this trend. However, it is possible to use other technologies to implement SOA as long as the basic principles of SOA are adhered to.

With essential philosophies and practices demystified, SOA is now becoming the foundation of many mission-critical applications—this drastically increases the performance, scalability, reliability, and policy enforcement requirements of SOA solutions. Services layers are often the building blocks on which agile business processes rest. Many real-life applications require handling of events and it is becoming important for SOA-enabling infrastructures to be able to accommodate event handling and processing alongside services. Services are also being seen as key ingredients in shared computing environments such Software-as-a-Service (SaaS) or cloud computing. Does this level of industry acceptance of SOA mean that we have attained SOA nirvana? The answer, of course, is No, or at least, Not Yet! Part of the reason is the increase in complexity as the SOA solutions are aimed at non-trivial and mission-critical applications. The complexity, at least as it relates to implementation of the solutions, mainly arises from the fact that to build such applications, you not only have to access and orchestrate services, but also, as in tiered compositions, orchestrate the orchestration of services, or include human workflow features like approvals and manual exception handling, or use business rules to add flexible decision making. In such cases, multiple development environments with corresponding technologies, metadata, and runtime engines would be necessary.

The developers would have to deal with these different development environments and would have to integrate the individual components themselves. The operations people would have to deal with the nuances of such custom integration of integration components for deployment, monitoring, and management. This complexity eats into the potential SOA benefits by significantly increasing the activity costs for SOA solutions.

Therefore, what is needed is a service platform where the design-time elements of all the necessary tools are available in one Integrated Development Environment (IDE), where such complex solutions can be composed easily out of the necessary components with drag-and-drop type simplicity, and from where the composed solution can be deployed and managed as one unit. From a technical perspective, emergence of such service platforms is the key to the next generation of SOA-enabling infrastructures. Of course, some guiding disciplines would be required to create such a platform. The recently proposed technology and vendor neutral Service Component Architecture (SCA) specification, that is backed by most of the leading software vendors concerned with SOA, is an important step in that direction. As we will see throughout this book, Oracle SOA Suite 11g leverages SCA in order to deliver such a service platform.

Composition, SCA, and service platform

One of the definitions of composition, as per the Merriam-Webster dictionary, is a product of mixing or combining various elements or ingredients. Services are often put together by combining functionalities from a variety of sources. Services are also combined together, in the spirit of service reuse, to create higher-level services termed composite services. Of course, composition in SOA does not only involve leveraging services or other functionalities from applications, but also could include conditional executions, message or payload format transformations, embedding human tasks, or business rules. Standard programming languages or scripts like Java, C++, C#, PHP, and so on could be used to accomplish such compositions. However, beyond trivial use cases, this strategy often renders the composition too rigid and difficult to understand, to maintain, and to change. Declarative composition tools, in particular the ones based on open standards, for example, a Business Process Execution Language (BPEL