bea.com | products | dev2dev | support | askBEA |
![]() |
![]() |
|
![]() |
e-docs > WebLogic Platform > Tour of the WebLogic Platform Sample Application > Introduction |
Tour of the WebLogic Platform Sample Application
|
BEA WebLogic Platform provides a standards-based, build-to-integrate approach that enables companies to develop and deploy applications, rapidly integrate with existing systems, automate business processes, and connect with business partners.
To support its build-to-integrate approach and enable WebLogic Platform feature interoperation, specific integration entry points are available to facilitate process-level communication and data flow between front-end Web applications and heterogeneous back-end systems. An integration entry point defines a place at which interoperation can take place.
The WebLogic Platform sample application is designed to highlight a number of these key integration points. It is also designed to be fun!
The sample includes a business-to-consumer (B2C) portal Web site for a fictitious company named Avitek Digital Imaging. Customers who visit the Avitek portal can purchase cameras and accessories. This Web site includes a product catalog, the use of two Web services, inventory checks, a full shopping cart and underlying processing, payment authorization, and order management.
The sample also shows a business-to-business (B2B) portal site. The Avitek intranet allows its purchasing agents to get quotes for product parts from external suppliers, select a quote, generate a purchase order for the part, and exchange acknowledgements with the selected supplier.
To help you understand the technology behind each page and event, the B2C and B2B samples also provide a built-in tour guide. The dynamic documentation content that is shown in the tour guide is based on the last event that occurred in the running Web application. This online book version of the tour presents a static view of the application's pages, but contains much of the same information. Read this online book if you prefer to read the explanations apart from the running application.
This section presents the following topics:
WebLogic Platform Architecture
WebLogic Platform provides an integrated set of features that include the J2EE-compliant application server, plus the development, portal, and integration frameworks that are built on top of it. The following figure shows how WebLogic Platform provides a single, highly integrated solution:
For a detailed overview, see Introducing WebLogic Platform.
The easiest way to start the WebLogic Platform sample is from the QuickStart application. QuickStart is designed to assist first-time users in evaluating, learning, and using WebLogic Platform. In addition to providing quick access to this and other samples, QuickStart provides pointers to useful tools for accomplishing specific development tasks, and to the online documentation.
QuickStart runs automatically after you complete a Typical or full Custom installation of WebLogic Platform. Because the sample includes live Web applications, you cannot run the sample if you performed a partial installation of the WebLogic Platform software. For more information about the installation process, see Installing WebLogic Platform.
The following screen shows the QuickStart options.
On the QuickStart page, select the "Take the Live Platform Tour" link. It invokes the sample's startup script, E2Estart.bat (Windows) or E2Estart.sh. The script file is located in the following directory under your BEA_HOME location:
weblogic700/samples/platform/e2eApp/config
After installation, you can launch QuickStart as follows:
cd /home/bea/weblogic700/common/bin
sh quickstart.sh
After the server starts, your default browser should open automatically if you used QuickStart. If you ran the E2Estart.bat or E2Estart.sh script directly, after the server has started and you see the "WebLogic Server started on..." confirmation message in the command window, open a supported browser and point to:
http://<host>:<port>
For example, if you are running the server on your local machine and used the default port number 7501, specify in the URL:
http://localhost:7501
If the server is running on a remote machine named (for example) blues and you used the default port, specify in the URL:
http://blues:7501
For information about the browsers that are supported by WebLogic Platform, see the Supported Platforms documentation.
The Sample's Introduction Page
After the server has started, as explained in the previous section, the sample application displays its Introduction page. It consists of five main sections. Each section is summarized here.
Section 01 Provides Introductory Text
Section 01 on the Introduction page is informational and does not contain links to the running sample. It simply presents an annotated screen shot of the tour guide portlet that you can use in the 02 (B2C) and 03 (B2B) Web applications. For example:
As you move from one page to another in the B2C or B2B portal, the tour guide can help you understand what's new and the next step to follow.
Each tour guide page also contains links to:
The Introduction page's section 01 also shows samples of two buttons used in the B2C and B2B portals. For example:
You can click either of these buttons to exit the B2C or B2B portal and return to the sample's Introduction page.
Section 02 Provides the Link to the B2C Portal
Section 02 on the Introduction page allows you to log into the B2C portal as "Rachel Adams." Rachel is an already registered customer of the fictitious Avitek Digital Image Web site. This part of the sample application includes a product catalog, the use of two Web services, inventory checks, a full shopping cart and underlying processing, payment authorization, and order management that includes passing XML order data to an integrated system. For example:
Section 03 Provides the Link to the B2B Portal
Section 03 on the Introduction page allows you to log into the B2B portal as "Jason Tang," an Avitek purchasing agent. Jason uses the Avitek intranet to get quotes for product parts from external suppliers, select a quote, generate a purchase order for the part, and exchange acknowledgements with the selected supplier.
Section 04 Provides the Link to a Web Services Tech Tour
Section 04 on the Introduction page links to a documentation-only Web services technical tour. For example:
It explains how we used WebLogic Workshop to define the separate Web services for Product Evaluator and Payment. This part of the tour also shows the steps in Portlet Wizard to generate the Web service interfaces code for the Product Evaluator portlet that you will see in the 02 B2C portal.
Finally, the Introduction page also contains a link to a brief, anonymous survey that you can take to rate your satisfaction with installing and evaluating WebLogic Platform. For example:
This sample application demonstrates several areas of technology integration with the components that comprise WebLogic Platform. The integration points include:
Product Evaluator Web Service and Portlet
The business-to-consumer (B2C) sample portal includes a "Product Evaluator" portlet that returns a product rating for a selected product item. You will see this portlet near the bottom of pages with the Products tab when you browse through the catalog's categories. For example:
The portlet includes code that points to a Web service, productEvalWSC, which we created using WebLogic Workshop.
A Web service is a language-independent, platform-independent, self-describing code module that applications can access via a network or the Internet. The application can have the service's location hard-coded or can locate it using UDDI (Universal Description, Discovery, and Integration). Because the service is self-describing, the application can determine which functions are available and how to call them.
In development, we used a browser-based test form provided by WebLogic Workshop to check whether the expected results were being returned by the Web service. For information about the test form's features and the portlet, see the section The Product Evaluator Portlet and Web Service. Also see Web Services Tour, for information about the development steps we followed in WebLogic Workshop and, separately, in the Portlet Wizard that comes with WebLogic Portal.
We also used WebLogic Workshop to design a Web service that performs payment authorization, capture, and settlement. In this portal application, after you click the Submit Order button in the shopping cart, the credit card information on the page is authorized via the Web service. In this sample, although the predefined credit card data and the Web service itself are stored locally, the code is a working example of the processing required.
The Payment Web service is "conversational" — the authorize() call starts the conversation; the capture() call continues the conversation; and the settle() call finishes or ends the conversation.
This Web service is called from a pipeline component named CajunBasedPaymentPC.java. The pipeline component uses a proxy to interact with this Web service. Error codes are returned in case there is a problem with the Payment authorization, capture, and settle methods. For details, see the Payment.jws file. The proxy used is generated via a WebLogic Server clientgen task.
Information about the Payment Web service and the Portlet Wizard is provided in the Web Services Technical Tour, which is available from this sample's Introduction page. For details, see Web Services Tour.
Orders Generated in WebLogic Portal Are Processed by WebLogic Integration Via JMS Queue and BPM
In the b2cPortal tour, after the logged-in user clicked a Submit Order button, the order generated in WebLogic Portal can be used in business processes. The order is converted to an XML representation and then placed on a Java Message Service (JMS) queue in WebLogic Integration. The business process management (BPM) component of WebLogic Integration then processes the order. For more information, see Business-to-Consumer (B2C) Portal Tour.
In the b2bPortal tour, Avitek purchasing agents get quotes from external suppliers for parts and then submit purchase orders, exchanging data with a selected supplier. This work involves two separate business processes: the Query for Price and Availability (QPA) business process, and the Purchase Order (PO) business process. WebLogic Integration manages the business conversations and collaboration agreements between business partners, and it automates the business message exchange between the buyer and suppliers. The workflows are referenced in the collaboration agreements and conversations. For details, see Avitek Purchasing Agents Connect with Suppliers.
Real-time Inventory Checks Via WebLogic Integration AI
The database for the sample application includes an inventory table. It keeps data about the current, minimum, and maximum inventory for products and parts. The b2cPortal includes a catalog with SKUs for product items sold on the Web site. The b2bPortal uses SKUs for both Products and the parts that comprise them.
For both portals, b2cPortal and b2bPortal, the inventory table is accessed in read-only mode via the Application Integration (AI) component of WebLogic Integration. When the user tries to add an item to the shopping cart, the inventory for that item will be checked to make sure the order can be fulfilled. For example, this check occurs when you click the Buy Now button on several portlets in this b2cPortal's Products page. An inventory check is also performed if the user tries to update the quantity of the item already in the shopping cart by entering a new value on the shopping cart's step1.jsp portlet, and then clicking the RECALCULATE button.
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |