Tải bản đầy đủ (.pdf) (720 trang)

Tài liệu Oracle SOA Suite 11g R1 Developer''''s Guide pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (15.41 MB, 720 trang )

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 ()
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 benets, 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 signicant 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 unied 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 benets 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 difcult 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

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 ofce. 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 signicantly 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 benets 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
(
). 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 signicant 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 unnished business!

So while this edition has been produced signicantly 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
A book like this doesn't make it into print without a lot of work from the publisher.
I would like to thank the team at Packt Publishing for all their support; especially
James Lumsden, Swapna Verlekar, and Prasad Rai.
A special mention must go to John Deeb, for his continual encouragement, input and
above all support in ensuring that I found time to write the book. I couldn't ask for a
more supportive friend and business partner.
Finally, I would like to say a very, very special thank you to my wife Natasha and
my children Elliot and Kimberley, who for the past three years have been incredibly
patient and supportive in allowing me to spend far too many evenings and
weekends stuck away in my ofce writing these books.
www.it-ebooks.info
About the Reviewers
John Deeb 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.
Prior to Rubicon Red, John held senior product management positions at Oracle and

TIBCO Software. His areas of focus include enterprise integration, business process
management, and business activity monitoring. John has worked with organizations
to educate and enable them in realizing the full business benets of BPM and SOA in
solving complex business problems.
John holds a Bachelors degree in Cognitive Science from the University of Queensland
and a Masters degree in IT from the Queensland University of Technology. He is a
regular speaker on middleware vision, strategy, and architecture.
Hans Forbrich is a well-known member of the Oracle Community. He started
with Oracle products in 1984 and has kept abreast of nearly all of Oracle's Core
Technologies. As ACE Director, Hans has been invited to be present at Oracle Open
World and various Oracle User Group meetings around the world. His company,
Forbrich Computer Consulting Ltd., is well established in western Canada. Hans
specializes in delivering Oracle University training through Oracle University and
partners such as Exit Certied.
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 Data and Database Management
Utilities, and Oracle VM Manager 2.1.2.
I wish to thank my wife Susanne, and the Edmonton Opera, for their
patience while I worked on these reviews as well as on my own book.
www.it-ebooks.info
Bill Hicks is a Senior Sales Consulting Manager for Australia and New Zealand,
specializing in Oracles' Middleware products.
Over the last 11 years at Oracle, Bill has held various positions within Sales
Consulting and Support.
His current focus is on Service-oriented Architecture and Cloud Computing and how
the varied Oracle Middleware product offerings can be utilized to deliver exible,
cost effective, and complete business solutions.

Marc Kelderman is working for Oracle Netherlands as a solution architect. He
started his career at Oracle in 1995 working in consulting. His broad knowledge of
Oracle products and IT technology helped making the projects he is involved to be
successful. Since 2005, he is implementing and has designed projects based on Oracle
SOA technology. From that period he started to share his solutions to a broader
audience via his blog (). Marc is often called for
as a speaker at seminars.
I would like to thank Matt and Antony for giving me the
opportunity to review their book. Good work!
Manoj Neelapu has around nine years of experience in Java/J2EE/SOA
technologies. He started his career as contractor engineer for Hindustan Aeronautics
Limited (Helicopter Division) and later worked for BEA Systems as Developer
Relations Engineer handling level3/4 support. Before joining Oracle, he had
experience working with open-source technologies at Sudhari.
As a Principal Engineer in Oracle, Manoj has expertise in various components of
Oracle Fusion Middleware stack, including Oracle Service Bus, Financial Service
Bus, JCA Adapters, and Oracle WebLogic Integration. He currently works for SOA
product lines as part of the engineering team. Among other activities, he actively
participates on Oracle Technology Network evangelizing, trouble-shooting, and
solving customer issues.
www.it-ebooks.info
ShuXuan Nie is a software engineer specializing in SOA and Java technologies.
He has more than eight years of experience in the IT industry that includes SOA
technologies such as BPEL, ESB, SOAP, XML, Enterprise Java technologies, Eclipse
plugins, and other areas such as C++ cross-platform development.
Since 2007, he has been working as part of the Oracle Global Customer
Support team and focuses on helping customers solve their Middleware/SOA
integration problems.
Before joining Oracle, he worked for IBM China in their Software Development
Lab for four years as a staff software engineer. She participated in several complex

products involving IBM Lotus Workplace, Websphere, and the Eclipse platform
before joining the Australia Bureau of Meteorology Research Center where she was
responsible for the implementation of the Automated Thunderstorm Interactive
Forecast System for Aviation and Defense.
He holds an M.Sc. in Computer Science from Beijing University of Aeronautics
and Astronautics.
When not 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 ACE Director. Since 2008, he leads together with
Torsten Winterberg from OPITZ Consulting, the special interest group "DOAG SIG
SOA". Hajo is a co-founder of the "Masons-of-SOA", an inter-company network,
consisting of architects of Oracle Germany, Opitz Consulting, SOPERA, and HP
ES - with the mission to spread SOA knowledge and support projects/initiatives
across companies. The masons meet regularly for thought exchange, have written a
multi-article series on Yet Unshackled SOA Topics, have contributed to Thomas Erl's
book SOA Design Patterns and are giving whole day advanced SOA workshops
on conferences.
Websites:
/>www.it-ebooks.info
www.it-ebooks.info
Table of Contents
Preface 1
Part 1: Getting Started
Chapter 1: Introduction to Oracle SOA Suite 11
Service-oriented architecture in short 11
Service 11

Orientation 12
Architecture 13
Why SOA is different 14
Terminology 15
Interoperability 15
Extension and evolution 15
Reuse in place 16
Service Component Architecture (SCA) 16
Component 17
Service 17
Reference 17
Wire 17
Composite.xml 17
Properties 18
SOA Suite components 18
Services and adapters 18
ESB – service abstraction layer 19
Oracle Service Bus and Oracle Mediator 20
Service orchestration – the BPEL process manager 21
Rules 22
Security and monitoring 22
Active monitoring – BAM 23
www.it-ebooks.info
Table of Contents
[ ii ]
Business to Business – B2B 24
Complex Event Processing – CEP 24
Event delivery network 24
SOA Suite architecture 24
Top level 25

Component view 25
Implementation view 26
A recursive example 27
JDeveloper 27
Other components 27
Service repository and registry 28
BPA Suite 28
The BPM Suite 28
Portals and WebCenter 28
Enterprise manager SOA management pack 29
Summary 29
Chapter 2: Writing your First Composite 31
Installing SOA Suite 31
Writing your first BPEL process 32
Creating an application 34
Creating an SOA project 36
SOA project composite templates 37
Creating a BPEL process 38
Assigning values to variables 40
Deploying the process 42
Testing the BPEL process 45
Adding a Mediator 51
Using the Service Bus 54
Writing our first proxy service 55
Writing the Echo proxy service 56
Creating a Change Session 57
Creating a project 58
Creating the project folders 58
Creating service WSDL 60
Importing a WSDL 61

Creating our business service 64
Creating our proxy service 67
Creating message flow 69
Activating the Echo proxy service 70
Testing our proxy service 72
Summary 75
www.it-ebooks.info
Table of Contents
[ iii ]
Chapter 3: Service-enabling Existing Systems 77
Types of systems 77
Web service interfaces 78
Technology interfaces 78
Application interfaces 80
Java Connector Architecture 80
Creating services from files 80
A payroll use case 81
Reading a payroll file 81
Starting the wizard 82
Naming the service 82
Identifying the operation 83
Defining the file location 85
Selecting specific files 86
Detecting that the file is available 88
Message format 89
Finishing the wizards 97
Throttling the file and FTP adapter 98
Creating a dummy message type 98
Adding an output message to the read operation 98
Using the modified interface 98

Writing a payroll file 99
Selecting the FTP connection 99
Choosing the operation 100
Selecting the file destination 100
Completing the FTP file writer service 102
Moving, copying, and deleting files 102
Generating an adapter 102
Modifying the port type 102
Modifying the binding 103
Configuring file locations through additional header properties 104
Adapter headers 105
Testing the file adapters 105
Creating services from databases 106
Writing to a database 106
Selecting the database schema 106
Identifying the operation type 107
Identifying tables to be operated on 108
Identifying the relationship between tables 109
Under the covers 110
Summary 110
Chapter 4: Loosely-coupling Services 111
Coupling 111
Number of input data items 112
Number of output data items 112
www.it-ebooks.info
Table of Contents
[ iv ]
Dependencies on other services 113
Dependencies of other services on this service 113
Use of shared global data 114

Temporal dependencies 114
Reducing coupling in stateful services 115
Service abstraction tools in SOA Suite 119
Do you have a choice? 119
When to use the Mediator 120
When to use Oracle Service Bus 120
Oracle Service Bus design tools 121
Oracle Workshop for WebLogic 121
Oracle Service Bus Console 121
Service Bus overview 121
Service Bus message flow 122
Virtualizing service endpoints 122
Moving service location 123
Using Adapters in Service Bus 125
Selecting a service to call 126
Virtualizing service interfaces 128
Physical versus logical interfaces 128
Mapping service interfaces 130
Applying canonical form in the Service Bus 135
An important optimization 136
Using the Mediator for virtualization 136
Summary 138
Chapter 5: Using BPEL to Build Composite Services
and Business Processes 139
Basic structure of a BPEL process 140
Core BPEL process 140
Variables 141
Partner links 142
Messaging activities 142
Synchronous messaging 142

Asynchronous messaging 143
A simple composite service 144
Creating our StockQuote service 145
Importing StockService schema 146
Calling the external web services 148
Calling the web service 150
Assigning values to variables 153
Testing the process 154
Calling the exchange rate web service 154
Assigning constant values to variables 155
www.it-ebooks.info
Table of Contents
[ v ]
Using the expression builder 156
Asynchronous service 160
Using the wait activity 163
Improving the stock trade service 164
Creating the while loop 164
Checking the price 166
Using the switch activity 167
Summary 170
Chapter 6: Adding in Human Workflow 171
Workflow overview 171
Leave approval workflow 172
Defining the human task 173
Specifying task parameters 175
Specifying task assignment and routing policy 176
Invoking our human task from BPEL 180
Creating the user interface to process the task 181
Running the workflow process 183

Processing tasks with the worklist application 184
Improving the workflow 186
Dynamic task assignment 186
Assigning tasks to multiple users or groups 188
Cancelling or modifying a task 189
Withdrawing a task 189
Modifying a task 189
Difference between task owner and initiator 190
Requesting additional information about a task 190
Managing the assignment of tasks 191
Reassigning reportee tasks 191
Reassigning your own task 193
Delegating tasks 193
Escalating tasks 193
Using rules to automatically manage tasks 194
Setting up a sample rule 195
Summary 198
Chapter 7: Using Business Rules to Define Decision Points 199
Business rule concepts 200
XML facts 200
Decision services 201
Leave approval business rule 201
Creating a decision service 202
Implementing our business rules 204
Adding a rule to our ruleset 206
Creating the IF clause 207
Creating the Then clause 208
www.it-ebooks.info
Table of Contents
[ vi ]

Calling a business rule from BPEL 211
Assigning facts 212
Using functions 213
Creating a function 214
Testing a function 219
Testing decision service functions 220
Invoking a function from within a rule 221
Using decision tables 222
Defining a bucket set 222
Creating a decision table 224
Conflict resolution 229
Summary 231
Chapter 8: Using Business Events 233
How EDN differs from traditional messaging 233
A sample use case 235
Event Delivery Network essentials 235
Events 235
Event publishers 238
Publishing an event using the Mediator component 238
Publishing an event using BPEL 240
Publishing an event using Java 243
Event subscribers 245
Consuming an event using Mediator 245
Consuming an event using BPEL 248
EDN publishing patterns with SOA Suite 250
Publishing an event on receipt of a message 251
Publishing an event on a synchronous message response 251
Publishing an event on a synchronous message request and reply 252
Publishing an event on an asynchronous response 252
Publishing an event on an asynchronous message request and reply 253

Publishing an event on an event 253
Monitoring event processing in Enterprise Manager 254
Summary 256
Chapter 9: Building Real-time Dashboards 257
How BAM differs from traditional business intelligence 257
Oracle BAM scenarios 258
BAM architecture 259
Logical view 259
Physical view 260
Acquire 260
Store 261
Process 261
www.it-ebooks.info
Table of Contents
[ vii ]
Deliver 262
Steps in using BAM 263
User interface 263
Monitoring process state 264
Defining reports and data required 265
Defining data objects 265
A digression on populating data object fields 268
Instrumenting BPEL and SCA 269
Invoking the BAM adapter as a regular service 269
Invoking the BAM adapter through BPEL sensors 273
Testing the events 278
Creating a simple dashboard 278
Monitoring process status 279
Monitoring KPIs 282
Summary 283

Part 2: Putting it All Together
Chapter 10: oBay Introduction 287
oBay requirements 288
User registration 288
User login 288
Selling items 288
List a new item 289
Completing the sale 290
View account 291
Buying items 291
Search for items 292
Bidding on items 292
Defining our blueprint for SOA 294
Architecture goals 294
Typical SOA Architecture 295
Application services layer 297
Virtual services layer 297
Business services layer 299
Business process 302
User interface layer 303
One additional layer 304
Where the SOA Suite fits 306
Composite application 308
Composite granularity 308
Basic composite design pattern 311
Where to implement virtual services 312
Mediator as a proxy for a composite 312
www.it-ebooks.info
Table of Contents
[ viii ]

Mediator as a proxy for an external reference 312
Using a composite as a virtual service 313
Service invocation between composite applications 314
oBay high-level architecture 316
oBay application services 316
Workflow services 316
External web services 317
oBay developed services 317
oBay internal virtual services 317
oBay business services 317
oBay business processes 318
oBay user interface 318
Summary 319
Chapter 11: Designing the Service Contract 321
Using XML Schema to define business objects 322
Modeling data in XML 322
Data decomposition 322
Data hierarchy 323
Data semantics 324
Using attributes for metadata 324
Schema guidelines 325
Element naming 325
Namespace considerations 327
Partitioning the canonical model 334
Single namespace 335
Multiple namespaces 336
Using WSDL to define business services 337
Use Document (literal) wrapped 338
Building your abstract WSDL document 338
WSDL namespace 338

Defining the 'wrapper' elements 339
Defining the 'message' elements 341
Defining the 'PortType' Element 342
Using XML Schema and the WSDL within SOA Suite 342
Sharing XML Schemas across composites 343
Defining an MDS connection 344
Importing schemas from MDS 345
Manually importing schemas 346
Deploying schemas to the SOA infrastructure 349
Importing the WSDL document into a composite 352
Sharing XML Schemas in the Service Bus 353
Importing the WSDL document into the Service Bus 354
Strategies for managing change 356
Major and minor versions 357
Service implementation versioning 357
www.it-ebooks.info
Table of Contents
[ ix ]
Schema versioning 358
Changing schema location 359
Updating schema version attribute 359
Resisting changing the schema namespace 359
WSDL versioning 360
Incorporating changes to the canonical model 360
Changes to the physical contract 360
Updating the service endpoint 361
Including version identifiers in the WSDL definition 361
Managing the service lifecycle 362
Summary 363
Chapter 12: Building Entity Services Using Service

Data Objects (SDOs) 365
Service Data Objects 367
Oracle 11g R1 support for SDO 367
Oracle SOA Suite 11g SDO support 367
Implementing a Service Data Object 368
Overview of ADF Business Components 368
Creating our ListingSDO application 370
Creating our Listing Business Components 371
Defining Entity objects 372
Defining updatable View objects 373
Defining the application module 373
Testing the listing ADF-BC in JDeveloper 375
Generating the primary key using an Oracle Sequence 375
Creating the ADF extension class for EntityImpl 376
Updating default ADF base classes 377
Configuring Listing entity to use Oracle Sequence 378
Creating the ListingSDO service interface 379
Enabling master detail updates 380
Deploying the Service Data Object 381
Creating a service deployment profile 382
Setting Web Context Root 382
Registering SDO with SOA infrastructure 383
Registering the ListingSDO as an RMI service 383
Configuring global JDBC data source 384
Determining the SDO registry key 385
Using the ListingSDO in an SOA composite 386
Creating an ADF-BC Service Reference 386
Invoking the SDO from BPEL 387
Creating an entity variable 388
Creating a Listing entity 389

Binding to the Listing entity 391
Inserting a detail SDO into a master SDO 393
Updating a detail SDO 395
Deleting a detail SDO 395
www.it-ebooks.info
Table of Contents
[ x ]
Deleting a Service Data Object 395
Exposing the SDO as a business service 396
Summary 398
Chapter 13: Building Validation into Services 399
Validation within a composite 400
Using XML Schema validation 402
Strongly-typed services 402
Loosely-typed services 405
Combined approach 406
Schema validation within the Mediator 406
Using schema validation within BPEL PM 407
Using schema validation within the Service Bus 410
Validation of inbound documents 411
Validation of outbound documents 413
Using Schematron for validation 413
Overview of Schematron 414
Assertions 415
Rules 416
Patterns 417
Namespaces 417
Schema 418
Intermediate validation 418
Cross field validation 418

Date validation 420
Element present 420
Using Schematron within the Mediator 421
Using the Metadata Service to hold Schematron files 422
Returning Schematron errors 423
Using Schematron with the Service Bus 423
Putting validation in the underlying service 423
Using Business Rules for validation 424
Coding in validation 425
Returning validation failures in synchronous services 425
Defining faults 426
Custom fault codes 426
Validation failures in asynchronous services 427
Layered validation considerations 428
Dangers of over validation 428
Dangers of under validation 429
Negative coupling of validation 429
Summary 430
www.it-ebooks.info

×