Bankapp Portal

This sample shows how to use the Tuxedo Control extension to call bankapp from a portal application.

This sample application uses the Tuxedo bankapp services DEPOSIT, WITHDRAWAL, and INQUIRY in a WebLogic Portal application.

To use the sample, you must have WebLogic Portal installed. The sample application needs to be targeted to a Portal-enabled domain. Make sure you configure WTC in this domain as instructed for the Bankapp Web Service sample. To use this sample, you must create a new Portal application and import the sample files into the new application, as described below. Once the application is setup, built and deployed, you can use the Workshop test browser to test it. With the file bank.portal open in the Workshop, select Portal -> Open Current Portal from the toolbar. You should see a web page open on the INQUIRY service portlet. Links at the top of the page take you to the other services.

Concepts Demonstrated By This Sample

Calling a Tuxedo application, bankapp, and using bankapp services from a portal application.

Sample Code

A sample portal file is available in <BEA_HOME>/weblogic81/samples/partners/Tuxedo/TuxSampleCode/bankPortal to assist you in understanding how to specify access to Tuxedo services from a portal application.

To use the sample, you must complete the following tasks.

  1. You must have WebLogic Portal installed.
  2. The sample application needs to be targeted to a Portal-enabled domain.
  3. Make sure you configure WTC in this domain as instructed for the Bankapp Web Service sample.
  4. Create a new portal application. In the WebLogic Workshop IDE select File->New->Application.
  5. In the New Application dialog, select Portal in the left pane and select Portal Application in the right-pane. Type a name for the portal application in the Name field and be sure the application is targeted to a portal domain, such as the samples portal domain in <BEA_HOME>/samples/domains/portal.
  6. Click Create.
  7. Create a new portal project. In the Application tab, right-click on the name of the application you created in the previous steps. Select New ->Project.
  8. In the New Project dialog, select Portal in the left pane and Portal Web Project in the right pane. Type a project name in the Project Name field.
  9. Click Create.
  10. Import the bankPortal sample files. In the Application tab, right-click the name of the Portal Web Project you created and select Import. In the Import dialog, browse to <BEA_HOME>/weblogic81/samples/partners/Tuxedo/TuxSampleCode/bankPortal/bankPortal. Select each of the files and folders in this directory and import them into your portal project.
  11. Insert the Tuxedo Control into your application. Open the file Controller.jpf in the Portal Web Project you created. Make sure you are in the Design View. Select Insert->Controls->Tuxedo from the main tool bar. The Insert Control - Tuxedo dialog displays.
    1. In step 1 of the dialog, enter myControl in the Variable name field.
    2. In step 2 of the dialog click Use a Tuxedo Control already defined by a JCX file to use an existing Tuxedo Control file. Browse to controls/BankCtrl.jcx file and click Select.
    3. Click Create in the Insert Control - Tuxedo dialog.
  12. You should now be able to build, deploy and test your portal application.
  13. Once the application is setup, built and deployed, you can use the WebLogic Workshop test browser to test it. With the file bank.portal open in WebLogic Workshop, select Portal ->Open Current Portal from the toolbar. You should see a web page open on the INQUIRY service portlet. Links at the top of the page take you to the other services.

Related Topics