Processing an Order in a Purchase Order System

ProcedureTo 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:

    1. Change the purchase order ID value in line 4 of the source code to 1234.

    2. Change the customer ID value in line 5 of the source code to 5678.

    3. Change the purchase order description value in line 6 of the source code to OrderVal_any_description.

    4. 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.
  6. Click Save All to save your work.

  7. From the IDE's Projects window, right-click HTTPBC-Test1 and select Run.

  8. 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.

  9. Now that your project has a test output message, run the test again. Right-click HTTPBC-Test1 and select Run.

  10. Check the IDEs JUnit Test Results window to verify that the test passed successfully.

  11. 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.