JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS HTTP Binding Component Tutorial     Java CAPS Documentation
search filter icon
search icon

Document Information

Processing an Order in a Purchase Order System

Tutorial Requirements

Prerequisites

System Requirements

Software Needed for the Tutorials

Project Overview

Scenario Message Flow

Core System Pieces

Configuring the Tutorial Environment

To check the status of GlassFish

To configure GlassFish

To start GlassFish

Creating a New Project

To Create a New Project

Creating the XML Schemas

Creating the inventory.xsd Schema

To create the inventory.xsd schema

To add a complex type to the XML Schema

Add Local Elements to the XML Schema

To add a global element

To validate the XML Schema

Creating the purchaseOrder.xsd Schema

To create the purchaseOrder.xsd schema

To add a complex type to the XML schema

To add local elements to the XML schema

To add a global element

To validate the XML schema

Creating and Configuring the WSDL Documents

Creating the InventoryService WSDL Document

To create the WSDL using the New WSDL Document wizard

To configure the InventoryService WSDL document:

Creating the POService WSDL Document

To create the POService WSDL document

To configure the POService WSDL document:

Creating the InventoryService BPEL Process

To create the InventoryService BPEL process

To Create the InventoryService business process using the BPEL Designer

To specify the business logic for the InventoryService BPEL process

Create the POService BPEL Process

To create the POService BPEL process

To Create the POService business process using the BPEL Designer

To specify the business logic for the POService business process

Building the Project

To compile and package the project

Creating and Deploying the Composite Application

To create the Composite Application project and add the JBI module

To build and deploy the Composite Application

Testing the HTTP Binding Component Sample Project

To run the HTTP-SOAP-PO-JBI project

Project Summary

Creating the XML Schemas

The next step in the Purchase Order sample project is to create the XML schemas

The HTTP-SOAP-PO-BPEL sample project includes two XML schema files. In this section, you create two new XML schema files for your BPEL Module project, inventory.xsd and purchaseOrder.xsd.

Creating the inventory.xsd Schema

The inventory.xsd XML schema enables the BPEL Service Engine to check the current inventory for a requested item.

Perform the following steps to create the schema:

To create the inventory.xsd schema

  1. In the Projects window, right-click the HTTP-SOAP-PO-BPEL node and select New -> Other from the pop-up menu.

    The New File Wizard appears.

  2. In the Categories field, select XML, and in the File Types field, select XML Schema.
  3. Click Next.
    image:Graphic shows the New File Wizard dialog box, as described in context.
  4. From the second page of the wizard, Name and Location, type inventory as the File Name.
  5. Click Finish.

    In the Projects window, the Process Files node now contains a subnode named inventory.xsd. The Source Editor contains a tab for the XML schema file, inventory.xsd, with the Schema view open.

To add a complex type to the XML Schema

  1. From the Schema view of the inventory.xsd, right-click the Complex Type node and select Add Complex Type from the pop-up menu.
  2. From the Add Complex Type dialog box, click OK. A complex type (newComplexType) is added to the second pane of the Schema window and a sequence node is added to the third pane of the Schema window.

Add Local Elements to the XML Schema

  1. From the Schema window, right-click the sequence node and select Add -> Element from the pop-up menu.

    The Add Element dialog box appears.

  2. From the Add Element dialog box, do the following:
    1. Enter orderId as the Name.
    2. For Type, select Use Existing Type and select Built-in Types -> int as the Current Selection.
      image:Graphic shows the Add Element dialog box, as described in context.
    3. Click OK.
  3. From the Schema window, right-click the sequence node again, and select Add -> Element from the pop-up menu.

    The Add Element dialog box appears.

  4. From the Add Element dialog box, do the following:
    1. Type inventoryStatus as the Name.
    2. For Type, select Use Existing Type and select Built-in Types -> boolean as the Current Selection.
    3. Click OK.
  5. From the Schema window, right-click the sequence node again, and select Add -> Element from the pop-up menu.
  6. From the Add Element dialog box, do the following:
    1. Type inventoryStatusMessage as the Name.
    2. For Type, select Use Existing Type and select Built-in Types -> string as the Current Selection.
    3. Click OK.

To add a global element

  1. From the left pane of the Schema window, right-click the Elements node, and select Add -> Element from the pop-up menu.
  2. From the Add Element dialog box, do the following:
    1. Type inventory as the Name.
    2. For Type, select Use Existing Type and select Complex Type -> newComplexType as the Current Selection.
    3. Click OK. A complex type (inventory) is added to the second pane of the Schema window.

To validate the XML Schema

  1. From the Schema Editor toolbar, click the Validate XML button. Validation begins.
  2. The Outlook window of the IDE displays the validation status. If any errors occur, double-click each error message to see the location of the error and make any necessary corrections. Run validation again to verify corrections.
  3. If your validation is successful, click File -> Save All() to save your current changes.

Creating the purchaseOrder.xsd Schema

Perform the following steps to create the schema:

To create the purchaseOrder.xsd schema

  1. In the Projects window, right-click the HTTP-SOAP-PO-BPEL -> Process Files node and select New -> XML Schema from the pop-up menu.

    The XML Schema wizard appears displaying the Name and Location page.

  2. From the Name and Location page of the wizard, enter purchaseOrder as the File Name.
  3. Click Finish. In the Projects window, the Process Files node now contains a subnode labeled purchaseOrder.xsd . The Source Editor contains a tab for the XML schema file, purchaseOrder.xsd, with the Schema view open.

To add a complex type to the XML schema

  1. From the Schema view of the purchaseOrder.xsd, right-click the Complex Type node and select Add Complex Type from the pop-up menu.
  2. From the Add Complex Type dialog box, click OK. A complex type (newComplexType) is added to the second pane of the Schema window and a sequence node is added to the third pane of the Schema window.

To add local elements to the XML schema

  1. From the Schema window, right-click the sequence node and select Add -> Element from the pop-up menu.

    The Add Element dialog box appears.

  2. From the Add Element dialog box, do the following:
    1. Type orderId as the Name.
    2. For Type, select Use Existing Type and select Built-in Types -> int as the Current Selection.
    3. Click OK.
  3. In the same manner, add three additional elements with the values shown in the following table:
    Name
    Type
    Current Selection
    Type
    customerId
    Use Existing Type
    Built-in Type
    int
    orderDescription
    Use Existing Type.
    Built-in Type
    String
    price
    Use Existing Type.
    Built-in Type
    double

To add a global element

  1. From the left pane of the Schema window, right-click the Elements node, and select Add -> Element from the pop-up menu.
  2. From the Add Element dialog box, do the following:
    1. Type purchaseOrder as the Name.
    2. For Type, select Use Existing Type and select Complex Type -> newComplexType as the Current Selection.
    3. Click OK. A complex type (purchaseOrder) is added to the second pane of the Schema window.

To validate the XML schema

  1. From the Schema Editor's toolbar, click the Validate XML button. Validation begins.
  2. If your validation is successful, click File -> Save All to save your current changes.