PacktLib: BPEL and Java Cookbook

BPEL and Java Cookbook


About the Author

About the Reviewers


Calling BPEL from Java


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

Calling Services from BPEL


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

Advanced Tracing and Logging


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

Custom Logging in the Oracle SOA Suite


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

Transforming and Validating the BPEL Services


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 activity

Embedding Third-party Java Libraries


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

Accessing and Updating the Variables


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

Exposing Java Code as a SOAP Service


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

Embedding Java Code Snippets


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

Using XML Facade for DOM


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

Exposing Java Code as a Web Service


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