BPEL and Java Cookbook

Book description

Written by an SOA guru to help you orchestrate web services, the 100 recipes in this book will make integrating Java and BPEL a smooth process. Using the examples you’ll avoid common problems and learn sophisticated techniques.

  • Easy to understand recipes for integrating Java and BPEL
  • Covers wide range of integration possibilities for orchestrating business processes
  • Provides step-by-step instructions on examples stretching throughout the chapters, covering all phases of development from specification to testing

In Detail

The Business Process Execution Language (BPEL) has become the de-facto standard for orchestrating web services. BPEL and web services are both clamped into Service-oriented Architecture (SOA). Development of efficient SOA composites too often requires usage of other technologies or languages, like Java. This Cookbook explains through the use of examples how to efficiently integrate BPEL with custom Java functionality.

If you need to use BPEL programming to develop web services in SOA development, this book is for you.

BPEL and Java Cookbook will show you how to efficiently integrate custom Java functionality into BPEL processes. Based on practical examples, this book shows you the solutions to a number of issues developers come across when designing SOA composite applications. The integration between the two technologies is shown two-fold; the book focuses on the ways that Java utilizes the BPEL and vice-versa.

With this book, you will take a journey through a number of recipes that solve particular problems with developing SOA composite applications. Each chapter works on a different set of recipes in a specific area. The recipes cover the whole lifecycle of developing SOA composites: from specification, through design, testing and deployment.

BPEL and Java Cookbook starts off with recipes that cover initiation of BPEL from Java and vice-versa. It then moves on to logging and tracing facilities, validation and transformation of BPEL servers, embedding of third-party Java libraries into BPEL. It also covers manipulation with variables in BPEL different techniques of Java code wrapping for web service usage and utilization of XML façades.

After reading BPEL and Java Cookbook you will be able to circumvent many of the issues that developers experience during SOA composite application development.

Table of contents

  1. BPEL and Java Cookbook
    1. Table of Contents
    2. BPEL and Java Cookbook
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    7. Preface
      1. What this book covers
        1. What you need for this book
        2. Who this book is for
        3. Conventions
      2. Reader feedback
      3. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Calling BPEL from Java
      1. Introduction
      2. Deploying a BPEL process
        1. Getting ready
        2. How to do it…
        3. There's more…
      3. Gathering a BPEL process's in and out parameters
        1. How to do it…
        2. How it works…
        3. See also
      4. Calling a synchronous BPEL process from Java
        1. How to do it…
        2. How it works…
        3. There's more…
      5. Calling an asynchronous BPEL process from Java
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Handling business faults from a synchronous BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      7. Handling business faults from an asynchronous BPEL process
        1. Getting ready

        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      8. Mapping the results of a BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
    9. 2. Calling Services from BPEL
      1. Introduction
      2. Implementing web services with Axis2
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      3. Implementing web services with JAX-WS
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      4. Invoking the RESTful web services
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. The binding type
          2. The operation attribute
      5. Invoking the synchronous web service
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      6. Invoking the asynchronous web service
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      7. The dynamic selection of the web service's endpoint
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      8. Invoking web services in a sequence
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      9. Invoking web services in parallel
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      10. Handling the faults thrown from a web service
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      11. Throwing the faults from BPEL
        1. How to do it…
        2. There's more…
    10. 3. Advanced Tracing and Logging
      1. Introduction
      2. Creating a custom logger in a BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Quick debug logger for the BPEL process
        5. See also
      3. Defining composite sensors
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Defining a variable sensor in BPEL
          2. Defining an activity sensor in BPEL
          3. Defining a fault sensor in BPEL
          4. The sensor action
        5. See also
      4. Adding a composite sensor
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Adding a BPEL sensor for JMS queuing
        5. See also
      5. Monitoring a composite sensor
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Configuring the logfiles
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Creating a log for every BPEL instance run
        5. See also
      7. Changing the level of tracing
        1. How to do it…
        2. How it works…
        3. There's more…
          1. Configuring the level of the custom loggers
        4. See also
      8. Editing the logfiles
        1. How to do it…
        2. There's more…
        3. See also
      9. Viewing logfiles in the Enterprise Manager Console
        1. How to do it…
        2. How it works…
      10. Viewing metrics and statistics
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
    11. 4. Custom Logging in the Oracle SOA Suite
      1. Introduction
      2. Logging to a custom file
        1. Getting ready…
        2. How to do it…
        3. How it works…
      3. Configuring custom handlers
        1. How to do it…
      4. Logging exceptions
        1. Getting ready…
        2. How to do it…
        3. There's more…
      5. Enabling logging on the BPEL server
        1. Getting ready…
        2. How to do it…
        3. How it works…
        4. There's more…
      6. Redirecting System.out and System.err files
        1. Getting ready…
        2. How to do it…
      7. Setting up a rotation logfile
        1. Getting ready…
        2. How to do it…
        3. How it works…
        4. See also
    12. 5. Transforming and Validating the BPEL Services
      1. Introduction
      2. Using the XSLT transformation in BPEL
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      3. Generating the XSLT map with the XSLT mapper
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      4. Performing copy between the variables
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Auto Map
          2. Completion Status
        5. See also
      5. Using the functions in the transformation operations
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      6. The chaining functions
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      7. Defining and importing the user-defined functions
        1. How to do it…
        2. How it works…
        3. There's more…
          1. Using the user-defined function
          2. Migrating the user-defined functions to the Oracle SOA server
      8. Using the xsl:for-each command
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Defining a parameter
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      10. Defining a variable
        1. How to do it…
        2. How it works…
      11. Validating the variables with the <assign> activity
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
    13. 6. Embedding Third-party Java Libraries
      1. Introduction
      2. Adding third-party libraries to the SOA Suite server
        1. How to do it…
        2. How it works…
        3. There's more…
        4. See also
      3. Adding custom classes to the SOA Suite server
        1. How to do it…
        2. How it works...
      4. Adding third-party libraries to JDeveloper projects
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Creating a user-defined library and referencing it inside a JDeveloper project
          2. Adding libraries from the JDeveloper project properties
        5. See also
      5. Adding custom classes to JDeveloper projects
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Adding custom classes from the JDeveloper project properties
        5. See also
      6. Invoking third-party libraries from BPEL 2.0 process
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Invoking third-party libraries from BPEL 1.1 process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
    14. 7. Accessing and Updating the Variables
      1. Introduction
      2. Defining global variables in a BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. Creating the variable dialog
        5. See also
      3. Defining local variables in a BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      4. Initializing a variable with an XML literal
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      5. Initializing a variable with an inline from-spec
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      6. Copying content between the variables
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      7. Accessing the fields within Element-based variables
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      8. Accessing the fields within the Message Type-based variables
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      9. Assigning numerical values to the variables
        1. Getting ready
        2. How to do it…
        3. There's more…
        4. See also
      10. Applying mathematical calculations on data in the variables
        1. Getting ready
        2. How to do it…
        3. How it works…
      11. Assigning Boolean values to the variables
        1. Getting ready
        2. How to do it…
      12. Assigning date or time to the variables
        1. Getting ready
        2. How to do it…
      13. Updating the variables using the BPELX extensions
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
          1. bpelx:append
          2. bpelx:InsertAfter
      14. Dynamic indexing of the variables
        1. Getting ready
        2. How to do it…
    15. 8. Exposing Java Code as a SOAP Service
      1. Introduction
      2. Defining the service interface
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      3. Preparing the service implementation
        1. Getting ready
        2. How to do it…
        3. See also
      4. Annotating Java code for web service creation
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more...
        5. See also
      5. Creating a document transport web service
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      6. Creating a RPC transport web service
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Creating literal and encoded web services
        1. Getting ready…
        2. How to do it…
        3. How it works…
          1. Using the document transport style with the literal use attribute
          2. Using the document transport style with the encoded use attribute
          3. Using the RPC transport style with the literal use attribute
          4. Using the RPC transport style with the encoded use attribute
        4. There's more…
      8. Using attachment types with web services
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Defining a web service returning no value
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      10. Defining a web service returning a value
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      11. Publishing a web service
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      12. Testing a web service
        1. Getting ready
        2. How to do it…
        3. There's more…
    16. 9. Embedding Java Code Snippets
      1. Introduction
      2. Preparing the development sandbox for the Java Embedding activity code in JDeveloper
        1. How to do it…
        2. How it works…
        3. See also
      3. Using the Java code placeholder in the BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      4. Invoking Java code from the BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      5. Reading the BPEL process variables
        1. How to do it…
        2. How it works…
        3. There's more…
        4. See also
      6. Setting the BPEL process variables
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Invoking Session bean from the BPEL process
        1. Getting ready
        2. How to do it…
        3. How it works…
      8. Using the utility functionality
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Advanced functions
          2. Mathematical functions
      9. Adding a log to the BPEL Audit Trail
        1. How to do it…
        2. How it works…
      10. Reading the process instance data
        1. Getting ready
        2. How to do it…
        3. There's more…
      11. Getting the BPEL process status data
        1. Getting ready
        2. How to do it…
        3. How it works…
    17. 10. Using XML Facade for DOM
      1. Introduction
      2. Setting up an XML facade project
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      3. Generating XML facade using ANT
        1. Getting ready
        2. How to do it...
        3. How it works…
        4. There's more...
        5. See also
      4. Creating XML facade from XSD
        1. How to do it...
        2. How it works...
        3. See also
      5. Creating XML facade from WSDL
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      6. Packaging XML facade into JAR
        1. Getting ready
        2. How to do it...
        3. There's more...
        4. See also
      7. Generating Java documents for XML facade
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
      8. Invoking XML facade from BPEL processes
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      9. Accessing complex types through XML facade
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      10. Accessing simple types through XML facade
        1. Getting ready
        2. How to do it...
        3. How it works...
    18. 11. Exposing Java Code as a Web Service
      1. Introduction
      2. Creating a service endpoint interface
        1. How to do it…
        2. How it works…
      3. Using non-exposable methods of service interface
        1. How to do it…
        2. How it works…
      4. Annotating the service endpoint interface with @WebService
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      5. Annotating the service endpoint interface with @SOAPBinding
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Wrapping exceptions into faults
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      7. Defining a request wrapper for a web service
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. See also
      8. Defining a response wrapper for a web service
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Defining a one or two way web service
        1. How to do it…
        2. How it works…
      10. Defining the direction of the parameters
        1. Getting ready
        2. How to do it…
        3. How it works…
      11. Publishing a web service without an application server
        1. How to do it…
        2. How it works…
    19. Index

Product information

  • Title: BPEL and Java Cookbook
  • Author(s): Jurij Laznik
  • Release date: September 2013
  • Publisher(s): Packt Publishing
  • ISBN: 9781849689205