Setting up an XML facade project

We start generating XML facade by setting up a project in a JDeveloper environment which provides convenient tools for building XML facades. This recipe will describe how to set up a JDeveloper project in order to build XML facade.

Getting ready

To complete the recipe, we need the XML schema of the BPEL process variables based on which we build XML facade. Explore the XML schema of our banking BPEL process. We are interested in the structure of the BPEL request message:

<xsd:complexType name="PrincipalExchange">
  <xsd:sequence>
    <xsd:element minOccurs="0" name="unadjustedPrincipalExchangeDate" type="xsd:date"/>
    <xsd:element minOccurs="0" name="adjustedPrincipalExchangeDate" type="xsd:date"/>
    <xsd:element minOccurs="0" name="principalExchangeAmount" type="xsd:decimal"/>
    <xsd:element minOccurs="0" name="discountFactor" type="xsd:decimal"/>
  </xsd:sequence>
<xsd:attribute name="id" type="xsd:int"/>
</xsd:complexType>    
    
<xsd:complexType name="CashflowsType">
  <xsd:sequence>
    <xsd:element maxOccurs="unbounded" minOccurs="0" name="principalExchange" type="prc:PrincipalExchange"/>  
  </xsd:sequence>
</xsd:complexType>    
    
<xsd:element name="Cashflows" type="prc:CashflowsType"/>

The request message structure presents just a small fragment of cash flows modeled in the banks. The concrete definition of a cash flow is much more complex. However, our definition contains all the right elements so that we can show the advantages of using XML facade in a BPEL process.

How to do it...

The steps involved in setting up a JDeveloper project for XML façade are as follows:

  1. We start by opening a new Java Project in JDeveloper and naming it CashflowFacade. Click on Next.
  2. In the next window of the Create Java Project wizard, we select the default package name org.packt.cashflow.facade. Click on Finish. We now have the following project structure in JDeveloper:
    How to do it...
  3. We have created a project that is ready for XML facade creation.

How it works...

After the wizard has finished, we can see the project structure created in JDeveloper. Also, the corresponding file structure is created in the filesystem.

See also

To learn how to generate XML facade via the ANT utility, refer to our next recipe, Generating XML facade using ANT.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset