ebook img

SOA and WS-BPEL: Composing Service-Oriented Solutions with PHP and ActiveBPEL PDF

313 Pages·2007·3.673 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview SOA and WS-BPEL: Composing Service-Oriented Solutions with PHP and ActiveBPEL

www.it-ebooks.info SOA and WS-BPEL Composing Service-Oriented Solutions with PHP and ActiveBPEL Yuli Vasiliev BIRMINGHAM - MUMBAI www.it-ebooks.info SOA and WS-BPEL Copyright © 2007 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 author, Packt Publishing, nor its dealers or 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 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 2007 Production Reference: 1040907 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847192-70-7 www.packtpub.com Cover Image by Vinayak Chittar ([email protected]) www.it-ebooks.info Credits Author Project Coordinator Yuli Vasiliev Abhijeet Deobhakta Reviewer Indexer Robert Mark Bhushan Pangaonkar Acquisition Editor Proofreader Priyanka Baruah Chris Smith Technical Editor Production Coordinator Akshara Aware Shantanu Zagade Editorial Manager Cover Designer Dipali Chittar Shantanu Zagade Project Manager Patricia Weir www.it-ebooks.info About the Author Yuli Vasiliev is a software developer, freelance author, and consultant currently specializing in open-source development, Oracle technologies, and service-oriented architecture (SOA). He has over 10 years of software development experience as well as several years of technical writing experience. He wrote a series of technical articles for Oracle Technology Network (OTN) and Oracle Magazine. www.it-ebooks.info www.it-ebooks.info Table of Contents Preface 1 Chapter 1: Web Services, SOA, and WS‑BPEL Technologies 5 Web Services 6 Communicating via SOAP 6 Binding with WSDL 10 Using XML Schema Types within WSDL Definitions 14 Service‑Oriented Architecture 17 Basic Principles of Service Orientation 17 Applying SOA Principles 19 SOA Compositions 25 Orchestration 25 Choreography 26 WS‑BPEL 28 WS-BPEL Processes 28 WSDL Definitions for Composite Services 30 Tools for Designing, Deploying, and Testing Solutions Based on WS-BPEL 36 Summary 37 Chapter 2: SOAP Servers and Clients with PHP SOAP Extension 39 Building Service Providers and Service Requestors 39 Setting Up the Database 41 Developing the PHP Handler Class 43 Designing the WSDL Document 44 Building the SOAP Server 46 Building the Service Requestor 46 Testing the Service 48 www.it-ebooks.info Table of Contents Using XML Schemas with WSDL 49 Including XML Schema Data Type Definitions in WSDL 49 Importing XML Schemas into WSDL Documents 52 Getting Data Types Defined in the XML Schema 54 Transmitting Complex Type Data 55 Exchanging Complex Data Structures with PHP SOAP Extension 56 Structuring Complex Data for Sending 60 Converting SOAP Messages' Payloads to XML 62 Using PHP SOAP Extension Tracing Capabilities 65 Dealing with Attributes 66 Transforming XML Documents with XSLT 75 Extending PHP SOAP Extension Predefined Classes 81 Defining Parameter‑Driven Operations 83 Summary 87 Chapter 3: Designing Data‑Centric Web Services 89 Which Database to Choose 90 Using MySQL 93 Building a Service Interacting with MySQL 94 Storing XML Data in Relational Tables 97 Using Oracle Database XE 103 Using XML Schemas with Oracle XML DB 104 XML Schema Validation Considerations 111 Defining Parameter‑Driven Operations on Data‑Centric Services 117 Defining XSD Types for Parameters 117 Moving Conditional Logic into the Database 119 Summary 123 Chapter 4: Building Web Service Applications 125 Defining Parameter‑Driven Operations on Fine‑Grained Services 125 Putting Info on Fine-Grained Services in a Separate XML File 127 Building Fine-Grained Services 128 Creating the Coarse-Grained Service 132 Testing the Application 134 Exposing Application Logic as a Web Service 135 Sharing the Same PHP Handler Class Between Services 136 Choosing the Appropriate Level of Service Granularity 139 Securing Services 143 Implementing Message-Level Security 143 Using SOAP Message Headers 150 Using WS-Security for Message-Level Security 157 Summary 161 [ ii ] www.it-ebooks.info Table of Contents Chapter 5: Composing SOA Solutions with WS‑BPEL 163 Getting Started with WS‑BPEL 163 How it Works 164 The Structure of a WS-BPEL Definition 165 An Example of a WS-BPEL Definition 167 Using ActiveBPEL Engine 174 Taking Advantage of the ActiveBPEL Open-Source Engine Project 176 Your First ActiveBPEL Project 176 Structure of the Business Process Archive (BPR) to be Deployed to the ActiveBPEL Engine 177 Designing WSDL for the WS-BPEL Process Service 178 Creating the WSDL Catalog 180 Designing the WS-BPEL Process Definition 180 Creating the Process Deployment Descriptor (PDD) Document 182 Deploying the WS-BPEL Process Service 182 Testing the WS-BPEL Process Service 186 Implementing Service‑Oriented Orchestrations 187 Creating the WSDL Definition Describing the WS-BPEL Process 187 Creating the WSDL Catalog 189 Creating the WS-BPEL Business Definition Containing Conditional Logic 189 Creating the PDD Document 193 Deploying the WS-BPEL Process Service 194 Testing the WS-BPEL Process Service 195 Summary 196 Chapter 6: ActiveBPEL Designer 197 Getting Started with ActiveBPEL Designer 197 Overview of ActiveBPEL Designer's User Interface 198 Your First Project in ActiveBPEL Designer 200 Creating the Project 200 Adding the WSDL Definition 201 Creating the WS-BPEL Process 203 Creating the Deployment Descriptor 207 Creating the Deployment Archive 208 Deploying the WS-BPEL Service to the ActiveBPEL Server Shipped with ActiveBPEL Designer 210 Testing the WS-BPEL Process Service 212 Implementing Service‑Oriented Orchestrations with ActiveBPEL Designer 212 Creating the Project 213 Adding the WSDL Describing the WS-BPEL Process 213 Adding the WSDL Definitions Describing the Partner Services 214 Creating the Process Definition 214 Creating the Process Deployment Descriptor 223 Deploying the WS-BPEL Process Service 226 [ iii ] www.it-ebooks.info Table of Contents Testing the WS-BPEL Process Service 227 Summary 228 Chapter 7: WS‑BPEL Process Modeling 229 Concurrency, Synchronization, and Asynchronous Communication in WS‑BPEL 229 Parallel Processing versus Sequential Processing 230 Parallel Processing in a Loop 231 Asynchronous Communication 232 Implementing Concurrency with the Flow Container 234 Defining Partner Services 234 Creating the Project 237 Creating the WSDL Describing the WS-BPEL Process 237 Adding Partner WSDL Definitions as Web References 239 Creating the Process Definition 240 Creating the Process Deployment Descriptor 243 Deploying the Process Service 245 Testing the Sequential Version of the WS-BPEL Process 246 Replacing Sequence with Flow 247 Testing the WS-BPEL Process Using a Parallel Flow to Handle Partner Services 248 Implementing a Parallel Loop 249 Defining the Partner Service Being Called from within the Loop 249 Creating the Project 251 Creating the WSDL Describing the WS-BPEL Process 252 Adding WSDL Definitions as Web References 255 Creating the Process Definition 255 Creating the PDD Descriptor 258 Deploying the WS-BPEL Process Service 260 Testing the Sequential Form of the forEach Activity 261 Moving to a Parallel forEach 263 Testing the Parallel forEach 264 Building an Asynchronous WS‑BPEL Process Service 265 Creating the Project 265 Creating the WSDL Describing the Asynchronous WS-BPEL Process 266 Creating the WSDL Describing the WS-BPEL Process Calling the Asynchronous WS-BPEL Process 267 Creating the Process Definition for the Calling Process 270 Creating the Process Definition for the Called Process 273 Creating the PDD Descriptor for the Calling Process 275 Creating the PDD Descriptor for the Called Process 278 [ iv ] www.it-ebooks.info

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.