BPEL and Java Cookbook

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.

BPEL and Java Cookbook

Cookbook
Jurij Laznik

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.
$10.00
$59.99
RRP $35.99
RRP $59.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781849689205
Paperback382 pages

About This Book

  • 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

 

Who This Book Is For

This book is aimed at Java developers who need to use BPEL programming to develop web services in SOA development. You should be experienced with Java programming and SOA, but knowledge of BPEL is not necessarily required.

Table of Contents

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

What You Will Learn

  • Call synchronous and asynchronous BPEL processes from Java code
  • Implement of web services with AXIS2 and JAX-WS
  • Call synchronous and asynchronous web services from BPEL process
  • Efficiently utilise the tracing and logging for tracking business process execution
  • Make use of validation and transformation of the BPEL services
  • Employ various techniques to variable manipulations in BPEL
  • Use annotations for describing web services
  • Perform work, management and monitoring tasks with the Oracle Enterprise Manager Console
  • Utilize the internal and external BPEL engine logging and tracing capabilities
  • Integrate various technologies for orchestration
  • Learn the techniques of using XML façades
  • Design, monitor and test SOA composite applications

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.

 

Authors

Table of Contents

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

Book Details

ISBN 139781849689205
Paperback382 pages
Read More