Index Changes

Processing an Order in a Purchase Order System Tutorial


Test the Project

The Test run feature allows you to test run your processes. BPEL processes are deployed to the BPEL runtime, which manages the process lifecycle.

Testing the HTTP Binding Component Sample Project

To run the HTTP-SOAP-PO-JBI project:

  1. From the NetBeans IDE Projects window, right click Test under HTTP-SOAP-PO-JBI, and select New Test Case from the pop-up menu. The New Test Case Wizard appears.
  2. From the New Test Case Wizard, type HTTPBC-Test1 as the Test Case Name, and click Next.
  3. From the Select the WSDL Document page of the wizard, expand the HTTP-SOAP-PO-BPEL node in the Select the WSDL Document field, and select POService.wsdl . Click Next.
  4. From the Select the Operation to Test page of the wizard, select the handlePurchaseOrder operation in the Select the Operation to Test field, and click Finish. The Input.xml code is displayed in the Source Editor.
  5. From the Source Editor, make the following changes to the Input.xml code:
  6. Change the purchase order ID value in line 4 of the source code to 1234.
  7. Change the customer ID value in line 5 of the source code to 5678.
  8. Change the purchase order description value in line 6 of the source code to OrderVal_any_description.
  9. Delete the value given for purchase price in line 7 of the source code.
    Note: To display line numbers, right-click the left frame of the Source Editor and select Show Line Numbers from the pop-up menu.
    Graphic displays the Source Editor as described in context
  10. Click Save All to save your work.
  11. From the IDE's Projects window, right-click HTTPBC-Test1 and select Run.
  12. The first time you test run the project, the project fails and an Overwrite Empty Output message appears. Click Yes to save your current output file as the test output.
  13. Now that your project has a test output message, run the test again. Right-click HTTPBC-Test1 and select Run.
  14. Check the IDEs JUnit Test Results window to verify that the test passed successfully.
  15. From the Projects window, double-click Output, under HTTP-SOAP-PO-JBI → Test → TestCase1. The message output, including the purchase price in line 8 of the code, is displayed in the Source Editor.
Note - You can also create a test case to check the Inventory Service by selecting InventoryService.wsdl as the WSDL document, and isInventoryAvailable as the operation.

Project Summary

In this tutorial, you created a purchase order composite application project that uses the HTTP Binding Component. In doing so, you created a BPEL Module project named HTTP-SOAP-PO-BPEL, which includes two XML Schemas, two WSDL documents, and two BPEL processes. Next, you created a composite application project named HTTP-SOAP-PO-JBI, added your HTTP-SOAP-PO-BPEL project to the composite application as a JBI module, and deployed the composite application project. You then tested your composite application.

Previous Home

JSPWiki v2.4.100
« Home Index Changes Prefs
This page (revision-2) was last changed on 03-Dec-08 16:38 PM, -0800 by rjacobus