Introduction
The Business Process Execution Language (BPEL) is based on XML, which means that all the internal variables and data are presented in XML. In this book, we cover both BPEL and Java. As both the technologies are complementary, we seek ways to ease the integration of the technologies. In order to handle the XML content from BPEL variables in Java resources (classes), we have a couple of possibilities:
- Use DOM (Document Object Model) API for Java, where we handle the XML content directly through API calls. An example of such a call would be reading from the input variable:
oracle.xml.parser.v2.XMLElement input_cf= (oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable","payload","/client:Cashflows");
We receive the
XMLElement
class, which we need to handle further, either be assignment, reading of content, iteration, or something else. - As an alternative, we can use XML facade though Java Architecture for XML Binding (JAXB). JAXB provides a...