You are previewing SOA and WS-BPEL.
O'Reilly logo
SOA and WS-BPEL

Book Description

Composing Service-Oriented Architecture Solutions with PHP and Open-Source ActiveBPEL

  • Build Web Services with PHP

  • Combine PHP Web Services into orchestrations with WS-BPEL

  • Use better WS-BPEL to enable parallel processing and asynchronous communication

  • Simplify WS-BPEL development with free graphical tool ActiveBPEL Designer

In Detail

When utilized within a Service-oriented Architecture (SOA), Web Services are part of a business process determining the logical order of service activities – logical units of work performed by one or more services. Today, the most popular tool for organizing service activities into business processes is Web Services Business Process Execution Language (WS-BPEL), a language defining an execution format for business processes operating on Web Services. While it is not a trivial task to define a business process definition with WS-BPEL from scratch, using a graphical WS-BPEL tool can significantly simplify this process.

Examples and practice are much more valuable than theory when it comes to building applications using specific development tools. Unlike many other books on SOA in the market, this book is not focused on architecture. Instead, through numerous examples, it discusses practical aspects of SOA and WS-BPEL development, showing you how to apply architecture in practice with the help of PHP, ActiveBPEL open-source engine, and ActiveBPEL Designer – powerful development tools available for free.

Table of Contents

  1. SOA and WS-BPEL
  2. Credits
  3. About the Author
  4. About the Reviewer
  5. Preface
    1. What This Book Covers
    2. Conventions
    3. Reader Feedback
    4. Customer Support
    5. Downloading the Example Code for the Book
      1. Errata
      2. Questions
  6. 1. Web Services, SOA, and WS‑BPEL Technologies
    1. Web Services
      1. Communicating via SOAP
      2. Binding with WSDL
      3. Using XML Schema Types within WSDL Definitions
    2. Service-Oriented Architecture
      1. Basic Principles of Service Orientation
      2. Applying SOA Principles
      3. SOA Compositions
        1. Orchestration
        2. Choreography
    3. WS-BPEL
      1. WS-BPEL Processes
      2. WSDL Definitions for Composite Services
      3. Tools for Designing, Deploying, and Testing Solutions Based on WS-BPEL
    4. Summary
  7. 2. SOAP Servers and Clients with PHP SOAP Extension
    1. Building Service Providers and Service Requestors
      1. Setting Up the Database
      2. Developing the PHP Handler Class
      3. Designing the WSDL Document
      4. Building the SOAP Server
      5. Building the Service Requestor
      6. Testing the Service
    2. Using XML Schemas with WSDL
      1. Including XML Schema Data Type Definitions in WSDL
      2. Importing XML Schemas into WSDL Documents
      3. Getting Data Types Defined in the XML Schema
    3. Transmitting Complex Type Data
      1. Exchanging Complex Data Structures with PHP SOAP Extension
      2. Structuring Complex Data for Sending
      3. Converting SOAP Messages' Payloads to XML
      4. Using PHP SOAP Extension Tracing Capabilities
      5. Dealing with Attributes
      6. Transforming XML Documents with XSLT
    4. Extending PHP SOAP Extension Predefined Classes
    5. Defining Parameter-Driven Operations
    6. Summary
  8. 3. Designing Data-Centric Web Services
    1. Which Database to Choose
    2. Using MySQL
      1. Building a Service Interacting with MySQL
      2. Storing XML Data in Relational Tables
    3. Using Oracle Database XE
      1. Using XML Schemas with Oracle XML DB
      2. XML Schema Validation Considerations
    4. Defining Parameter-Driven Operations on Data‑Centric Services
      1. Defining XSD Types for Parameters
      2. Moving Conditional Logic into the Database
    5. Summary
  9. 4. Building Web Service Applications
    1. Defining Parameter-Driven Operations on Fine‑Grained Services
      1. Putting Info on Fine-Grained Services in a Separate XML File
      2. Building Fine-Grained Services
      3. Creating the Coarse-Grained Service
      4. Testing the Application
    2. Exposing Application Logic as a Web Service
      1. Sharing the Same PHP Handler Class Between Services
      2. Choosing the Appropriate Level of Service Granularity
    3. Securing Services
      1. Implementing Message-Level Security
      2. Using SOAP Message Headers
      3. Using WS-Security for Message-Level Security
    4. Summary
  10. 5. Composing SOA Solutions with WS-BPEL
    1. Getting Started with WS-BPEL
      1. How it Works
      2. The Structure of a WS-BPEL Definition
      3. An Example of a WS-BPEL Definition
    2. Using ActiveBPEL Engine
      1. Taking Advantage of the ActiveBPEL Open-Source Engine Project
      2. Your First ActiveBPEL Project
        1. Structure of the Business Process Archive (BPR) to be Deployed to the ActiveBPEL Engine
        2. Designing WSDL for the WS-BPEL Process Service
        3. Creating the WSDL Catalog
        4. Designing the WS-BPEL Process Definition
        5. Creating the Process Deployment Descriptor (PDD) Document
        6. Deploying the WS-BPEL Process Service
        7. Testing the WS-BPEL Process Service
    3. Implementing Service-Oriented Orchestrations
      1. Creating the WSDL Definition Describing the WS-BPEL Process
        1. Creating the WSDL Catalog
      2. Creating the WS-BPEL Business Definition Containing Conditional Logic
      3. Creating the PDD Document
        1. Deploying the WS-BPEL Process Service
        2. Testing the WS-BPEL Process Service
    4. Summary
  11. 6. ActiveBPEL Designer
    1. Getting Started with ActiveBPEL Designer
      1. Overview of ActiveBPEL Designer's User Interface
      2. Your First Project in ActiveBPEL Designer
        1. Creating the Project
        2. Adding the WSDL Definition
        3. Creating the WS-BPEL Process
        4. Creating the Deployment Descriptor
        5. Creating the Deployment Archive
        6. Deploying the WS-BPEL Service to the ActiveBPEL Server Shipped with ActiveBPEL Designer
        7. Testing the WS-BPEL Process Service
    2. Implementing Service-Oriented Orchestrations with ActiveBPEL Designer
      1. Creating the Project
      2. Adding the WSDL Describing the WS-BPEL Process
      3. Adding the WSDL Definitions Describing the Partner Services
      4. Creating the Process Definition
      5. Creating the Process Deployment Descriptor
      6. Deploying the WS-BPEL Process Service
      7. Testing the WS-BPEL Process Service
    3. Summary
  12. 7. WS-BPEL Process Modeling
    1. Concurrency, Synchronization, and Asynchronous Communication in WS-BPEL
      1. Parallel Processing versus Sequential Processing
      2. Parallel Processing in a Loop
      3. Asynchronous Communication
    2. Implementing Concurrency with the Flow Container
      1. Defining Partner Services
      2. Creating the Project
      3. Creating the WSDL Describing the WS-BPEL Process
      4. Adding Partner WSDL Definitions as Web References
      5. Creating the Process Definition
      6. Creating the Process Deployment Descriptor
      7. Deploying the Process Service
      8. Testing the Sequential Version of the WS-BPEL Process
      9. Replacing Sequence with Flow
      10. Testing the WS-BPEL Process Using a Parallel Flow to Handle Partner Services
    3. Implementing a Parallel Loop
      1. Defining the Partner Service Being Called from within the Loop
      2. Creating the Project
      3. Creating the WSDL Describing the WS-BPEL Process
      4. Adding WSDL Definitions as Web References
      5. Creating the Process Definition
      6. Creating the PDD Descriptor
      7. Deploying the WS-BPEL Process Service
      8. Testing the Sequential Form of the forEach Activity
      9. Moving to a Parallel forEach
      10. Testing the Parallel forEach
    4. Building an Asynchronous WS-BPEL Process Service
      1. Creating the Project
      2. Creating the WSDL Describing the Asynchronous WS‑BPEL Process
      3. Creating the WSDL Describing the WS-BPEL Process Calling the Asynchronous WS-BPEL Process
      4. Creating the Process Definition for the Calling Process
      5. Creating the Process Definition for the Called Process
      6. Creating the PDD Descriptor for the Calling Process
      7. Creating the PDD Descriptor for the Called Process
      8. Deploying the Example
      9. Testing the Asynchronous Example
      10. If Something Goes Wrong
    5. Summary
  13. A. Setting Up Your Work Environment
    1. Installing Apache HTTP Server
    2. Installing PHP
      1. Installing PHP on Windows
      2. Installing PHP on Unix-Like Systems
    3. Installing MySQL
      1. Installing MySQL on Windows
      2. Installing MySQL on Linux
    4. Installing Oracle Database Express Edition (XE)
      1. Installing Oracle Database XE on Windows
      2. Installing Oracle Database XE on Linux
    5. Installing Apache Tomcat 5.5
      1. Installing Apache Tomcat 5.5 on Windows
      2. Installing Apache Tomcat 5.5 on Linux
    6. Installing the ActiveBPEL Engine
    7. Installing ActiveBPEL Designer