+ All Categories
Home > Documents > Oracle SOA Suite 11g:Build

Oracle SOA Suite 11g:Build

Date post: 20-Oct-2015
Category:
Upload: mohsen-tavakkoli
View: 246 times
Download: 4 times
Share this document with a friend
Description:
Build Composite ApplicationsVolume I • Activity GuideInformation Aboute This document contains proprietary information and is protected bycopyright and other intellectual property laws.The goal of this practice is to configure your JDeveloper development environmentconnections to match the run-time environment requirements. Key tasks include:• Creating a Database Connection for the SOADEMO database schema. Thisconnection is used by components, such as the Database Adapter, which accessdatabase data.• Creating an Application Server Connection to enable you to deploy SOAcomposite applications and Web Service projects that you create in this course• Creating a WSIL Connection to the application server that can be used to look upWSDL URLs for SOA and Web services required by the purchase orderprocessing applicationNote: The JDeveloper Browser and Proxy preference settings need to be modifiedbefore creating the WSIL connection.• Setting JDeveloper preferences, such as disabling the HTTP Proxy setting in theWeb Brower and Proxy JDeveloper preferences. This is done to avoid networkaccess problems as a result of network proxy configuration for Oracle Universityclassroom environments.
Popular Tags:
372
Oracle SOA Suite 11g: Build Composite Applications Volume I Activity Guide D53946GC20 Edition 2.0 September 2010 D65409 Oracle Internal & Oracle Academy Use Only
Transcript
  • Oracle SOA Suite 11g: Build Composite Applications Volume I Activity Guide

    D53946GC20

    Edition 2.0

    September 2010

    D65409

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Copyright 2010, Oracle and/or its affiliates. All rights reserved.

    Disclaimer

    This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except whereyour use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle.

    The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free.

    Restricted Rights Notice

    If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable:

    U.S. GOVERNMENT RIGHTSThe U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.

    Trademark Notice

    Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

    AuthorGlenn Stokol

    Technical Contributors and ReviewersAkshatha NiranjanAnand SidgiddiAnirudh Pucha

    Anjulaponni Azhagulekshmi

    SubbiahpillaiAvijit BorthakurBijoy ChoudhuryBrian FryClemens UtschigDavid McCannDavid ShafferDavid TwelvesDeirdre MatishakDemed LHerDhiraj ThakkarGangadhar KonduriHeidi BuelowHolger Dindler RasmussenJames MillsJay KasiJoe GreenwaldJohn CobbKalpak KothariKen CooperKevin ClugageKhanderao KandKristopher RiceLloyd WilliamsLynn MunsingerManoj DasMark KennedyMelody YangMohan KamathPeter LaseauPrabhu ThukkaramPrasad Dixit-HardikarPrasen PalvankarRakesh SahaRashmi MenonRobert LaVallie

    Shay ShmeltzerSheela VasudevanStephanie McReynoldsSteven FriedbergSteven MuenchSwarnapriya ShridharTed WitiukTimothy GleasonTom HardyValli PataballaVasiliy StrelnikovVikas AnandVikas JainViktor TchemodanovWilliam PrewittYan JingYi LuYogesh KumarYosuke Katsuki

    EditorsArijit Ghosh Nita Pavitran

    Graphic DesignerRajiv Chandrabhanu

    PublisherSyed Imtiaz Ali

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • iii

    Contents Practices for Lesson 1 ......................................................................................................... 2

    Practice 1-1: Start JDeveloper and Create a Database Connection ................................ 3 Practice 1-2: Create an Application Server Connection ................................................. 5 Practice 1-3: Set JDeveloper Preferences ....................................................................... 8 Practice 1-4: Create a WSIL Connection...................................................................... 12

    Practices for Lesson 2 ....................................................................................................... 15 Practice 2-1: Examine Purchase Order XML Schema.................................................. 16 Practice 2-2: Examine soademo Database Tables and Data....................................... 19

    Practices for Lesson 3 ....................................................................................................... 20 Practice 3-1: Create the POProcessing Composite ....................................................... 21 Practice 3-2: Add a Transformation to the Mediator Component ................................ 38 Practice 3-3: Deploy and Test the POProcessing Composite Application ................... 43

    Practices for Lesson 4 ....................................................................................................... 51 Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name.............. 52 Practice 4-2: Generate and Validate a Configuration Plan ........................................... 59 Practice 4-3: Test a Composite Deployed with a Configuration Plan .......................... 62

    Practices for Lesson 5 ....................................................................................................... 68 Practice 5-1: Create the CreditCardValidation SOA Project ........................................ 69 Practice 5-2: Create a Database Adapter to Query Credit Cards .................................. 78 Practice 5-3: Deploy and Test the CreditCardValidation Composite........................... 91

    Practices for Lesson 6 ....................................................................................................... 93 Practice 6-1: Restructure the POProcessing Assembly Model ..................................... 94 Practice 6-2: Calculate Order Totals with XSL Transformations................................. 99 Practice 6-3: Test the Modified POProcessing Application ....................................... 107

    Practices for Lesson 7 ..................................................................................................... 111 Practice 7-1: Add BPEL Components to the POProcessing Assembly Model .......... 112 Practice 7-2: Add Filters to the EnrichPO Mediator Routing Rules........................... 121 Practice 7-3: Design the initial ApproveCCOrder BPEL Process .............................. 126 Practice 7-4: Design the initial Fulfillment BPEL Process......................................... 143 Practice 7-5: Deploy and Test POProcessing with BPEL Components ..................... 150

    Practices for Lesson 8 ..................................................................................................... 158 Part 1 ........................................................................................................................... 161 Practice 8-1: Create the CreditCardValidation External Reference ........................... 161 Practice 8-2: Invoke Credit Card Validation from ApproveCCOrder ........................ 165 Part 2 ........................................................................................................................... 180 Practice 8-3: Invoke the Fulfillment Process from ApproveCCOrder........................ 180 Practice 8-4: Invoke JMS Adapters in the Fulfillment BPEL Process ....................... 189 Practice 8-5: Deploy and Test the POProcessing Composite Application ................. 218

    Practices for Lesson 9 ..................................................................................................... 230 Practice 9-1: Deploy ADF Application Projects as Services...................................... 232 Practice 9-2: Modify InternalStore with Pick and While Activities ........................... 238

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • iv

    Practice 9-3: Modify OnlineStore with a FlowN Activity.......................................... 264 Practice 9-4: Deploy and Test InternalStore and OnlineStore Applications .............. 273 Practice 9-5: Add a Flow to the Fulfillment BPEL Process ....................................... 286 Practice 9-6: Deploy and Test POProcessing with Stock Checks .............................. 316

    Practices for Lesson 10 ................................................................................................... 328 Practice 10-1: Modify CreditCardValidation Composite Assembly Model............... 330 Practice 10-2: Create the CheckCCLimit BPEL Implementation .............................. 341 Practice 10-3: Modify ApproveCCOrder BPEL to Handle Credit Exceptions .......... 354 Practice 10-4: Test CreditCardValidation and POProcessing Exceptions.................. 358

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 1

    Information about XML Element Names in Practice Documentation Consider the XML tree structure in the following image of JDevelopers XSLT Mapper:

    In the sample image observe that each XML element (the tree nodes below the root) has an XML namespace prefix, such as imp1: in the image example. The XML namespace prefix, which maps to an XML Namespace string, is:

    Used to uniquely identify (qualify) each XML element Generated dynamically by the JDeveloper tool that creates the XML structure.

    When you carry out the practice instructions in this document, dynamically generated XML namespace prefixes for your XML elements may differ from those shown in the screenshots of this document. Note: Therefore, the practice instructions do not specify the XML namespace prefixes for XML elements that you work with, even though the screenshots related to those instructions contain XML namespace prefix values. The screenshots are provided as sample and guide. Your job is to ensure that the XML element names and structures created, mapped, or referenced are correct as documented, and not to be concerned about different XML namespace values.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 2

    Practices for Lesson 1 The goal of this practice is to configure your JDeveloper development environment connections to match the run-time environment requirements. Key tasks include:

    Creating a Database Connection for the SOADEMO database schema. This connection is used by components, such as the Database Adapter, which access database data.

    Creating an Application Server Connection to enable you to deploy SOA composite applications and Web Service projects that you create in this course

    Creating a WSIL Connection to the application server that can be used to look up WSDL URLs for SOA and Web services required by the purchase order processing application Note: The JDeveloper Browser and Proxy preference settings need to be modified before creating the WSIL connection.

    Setting JDeveloper preferences, such as disabling the HTTP Proxy setting in the Web Brower and Proxy JDeveloper preferences. This is done to avoid network access problems as a result of network proxy configuration for Oracle University classroom environments.

    The following image depicts the connections created in this practice:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 3

    Practice 1-1: Start JDeveloper and Create a Database Connection In this practice, you start JDeveloper and create a database connection. To complete this task, perform the following steps:

    1) On the Desktop, double-click the JDeveloper 11g desktop icon to start JDeveloper. Note: The Oracle Database 10g Enterprise Edition server should already be running. If you have connection problems, request for assistance from the instructor.

    2) In the JDeveloper window, click the View > Resource Palette menu.

    3) On the JDeveloper Resource Palette, click the New icon ( ) and select New Connection > Database.

    4) In the Database Connection dialog box, enter the following details:

    a) Use the IDE Connections option. b) Enter the following field values:

    Connection Name: soademo Username: soademo Password: soademo Hostname: localhost Port: 1521 SID: XE

    Note: The Connection Name value is case-sensitive! c) Select the Save Password option, and accept the default values for the remaining

    fields.

    d) Click Test Connection to verify that you can successfully connect to the database, and then click OK.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-1: Start JDeveloper and Create a Database Connection (continued)

    Oracle SOA Suite 11g: Build Composite Applications 4

    Note: Use the following image as a guide:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 5

    Practice 1-2: Create an Application Server Connection In this practice, you create an Application Server connection for your SOA Server to enable you to deploy SOA Composite application projects and other services. To complete this task, perform the following steps:

    1) Start the WebLogic Administration server by double-clicking the Start WebLogic Admin Server icon on the desktop. Wait until the server is started. You can verify this when you see the text similar to the following display in the terminal window:

    2) Start the SOA Server (managed server) by double-clicking the Start SOA Server icon on the desktop. Wait until the server is started. You can verify this when you see the text similar to the following display in the terminal window: INFO: FabricProviderServlet.stateChanged SOA Platform is running and accepting requests Note: You can ignore the warnings displayed in the command SOA Server command window.

    3) In the JDeveloper Resource Palette, click New icon ( ) > New Connection > Application Server.

    4) On the Create Application Server Connection wizard pages, enter the information specified in the following table:

    Step Screen/Page Description Choices or Values a. Create Application Server

    Connection Step 1 of 5 On the Name and Type page enter: Connection Name: soaserver Accept default for other items, and click Next.

    b. Create Application Server Connection Step 2 of 5

    On the Authentication page enter: Username: weblogic Password: welcome1 Click Next.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-2: Create an Application Server Connection (continued)

    Oracle SOA Suite 11g: Build Composite Applications 6

    Step Screen/Page Description Choices or Values c. Create Application Server

    Connection Step 3 of 5 On the Configuration page enter: WLS Domain: soa_domain Accept defaults for remaining fields, and click Next.

    d. Create Application Server Connection Step 4 of 5

    On the Test page: Click Test Connection. Ensure a success result is displayed for all eight tests, and click Finish.

    Note: If you require help to perform this task, refer to the following screenshots for guidance to the steps described in the preceding table of instructions:

    a)

    b)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-2: Create an Application Server Connection (continued)

    Oracle SOA Suite 11g: Build Composite Applications 7

    c)

    d)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 8

    Practice 1-3: Set JDeveloper Preferences In this practice, you set some JDeveloper preferences to ensure the settings are compatible for the work being done in the Oracle University network environment. You also learn about some other useful settings.

    1) To open the JDeveloper Preferences, select Tools > Preferences from the menu.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-3: Set JDeveloper Preferences (continued)

    Oracle SOA Suite 11g: Build Composite Applications 9

    2) In the Preferences window, perform the following steps to alter the preferences mentioned:

    a) For the Environment preference settings, which is the first set of preferences shown when you open the Preferences window, locate the Encoding preference and select UTF-8 from the pull-down box. Use the following image as a guide:

    Note: The UTF-8 encoding setting is recommended for ADF-based JSF applications that are generated for use in the Oracle SOA Worklist application to display tasks for assignees in human workflow functionality.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-3: Set JDeveloper Preferences (continued)

    Oracle SOA Suite 11g: Build Composite Applications 10

    b) In the Preferences window, expand the Code Editor preference (the sixth entry in the navigation tree on the left pane), and click the Line Gutter node. In the Line Gutter settings, select the Show line Numbers option. Use the following image as a guide:

    Note: Show Line Numbers displays a line number for each line of source code. This is a useful preference to locate specific lines of code reported for compiler errors and when various design-time tools detect errors in your application code or structures.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-3: Set JDeveloper Preferences (continued)

    Oracle SOA Suite 11g: Build Composite Applications 11

    c) In the left navigation pane, scroll down and select the Web Browser and Proxy entry. In the Web Browser and Proxy preferences, deselect the Use HTTP Proxy Server check box. Use the following image as a guide:

    Note: If you are working with these practices in a non-Oracle University environment then it is likely that you do not have to change this preference. It depends on whether your corporate network proxy allows or denies access to various external URLs in HTTP requests that are used by JDeveloper.

    3) In the Preferences window, click OK to apply the selected preference changes. Close the Preferences window.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 12

    Practice 1-4: Create a WSIL Connection In this practice, you create a WSIL connection enabling you to look up Web Service and SOA Composite application WSDL URLs from the run-time environment through a WSIL service application predeployed with the installation of Oracle WebLogic Server. Note: Before creating the WSIL connection, you should have disabled the Browser and Proxy settings in JDeveloper Preferences as described in the practice titled Set JDeveloper Preferences." To complete these tasks, perform the following steps:

    1) In the JDeveloper Resource Palette window, click the New icon ( ) > New Connection > WSIL.

    2) On the WSIL Connection wizard pages, enter the information specified in the following table:

    Step Screen/Page Description

    Choices or Values

    a. Welcome Click Next. b. Connection Type Accept the default settings.

    Click Next. c. WSIL URL WSIL File:

    http://localhost:8001/inspection.wsil Click Next.

    d. Authentication Username: weblogic Password: welcome1 Click Next.

    e. Finish Click Finish.

    Note: Use the following screenshots if you require guidance through the steps described in the preceding table of instructions:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-4: Create a WSIL Connection (continued)

    Oracle SOA Suite 11g: Build Composite Applications 13

    a)

    b)

    c)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 1-4: Create a WSIL Connection (continued)

    Oracle SOA Suite 11g: Build Composite Applications 14

    d)

    3) To confirm that the WSIL connection is operational, on the Resource Palette expand

    the WSIL node and expand the WSILConnection1 entry. You should see two subfolders called: soa-infra and usermessagingserver, as shown in the following image:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 15

    Practices for Lesson 2 The goal of this practice is to familiarize yourself with the customer order in the po.xsd XML Schema, and the application internal representation of the order in the internalorder.xsd. The XSD files are opened with the JDeveloper XML Schema Editor to enable you to make some comparisons based on questions asked in the practices. The following images provide a partial visual representation of the po.xsd and internalorder.xsd files:

    In addition, you examine the CREDITCARDS table data in the soademo database schema used by the purchase order processing application. The following image represents the JDeveloper Database Navigator window, from which you can browse, modify, and create database structures, as well as query and modify the data they contain:

    Note: Familiarization with some of the data and data structures facilitates understanding the application design and implementation tasks performed in subsequent practices.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 16

    Practice 2-1: Examine Purchase Order XML Schema In this practice, you open the po.xml supplied XML schema file using the XML schema editor. This enables you to view the structure payload of information. Note: For answers to the questions posed in this section refer to the table of answers at the end of this practice.

    1) In the JDeveloper window, select the File > Open menu and browse for and open the D:\labs\files\files.jws file. Note: If the Open Warning dialog box is displayed, at the Do you want to migrate these files? prompt click Yes. In the Migration Status dialog box, click OK.

    2) To examine the purchase order XML schema, perform the following steps: a) In the JDeveloper Application Navigator, in files project expand the Application

    Sources > xsd folders.

    b) Double-click the po.xsd file to open the file in the XSD Editor.

    c) Expand the OrderItemType and answer the following question: What is the data type for the price element?

    d) Expand the PurchaseOrderType complex type and answer the following questions:

    i) What are the type and values for the payOption element? ii) What are the name and type of the repeating element?

    3) To compare the po.xsd with the internalorder.xsd, open both files and answer the following questions: Hints: To view both XML schema files at the same time, JDeveloper allows you to rearrange the XSD windows side-by-side (horizontally) or one above the other (vertically). If needed ask your instructor to demonstrate this capability.

    a) Associate the first-level child elements of the PurchaseOrder element in the po.xsd with their corresponding order elements in the internalorder.xsd, and identify the differences in XML element names and types (if any).

    b) Expand the items element of the PurchaseOrder parent in the po.xsd, and the corresponding items element of the order parent in the internalorder.xsd, and describe the main differences.

    c) Expand the OrderItemType complexType in the po.xsd and itemType complexType in the internalorder.xsd and identify the differences in XML element names and types.

    d) Which element in the po.xsd is assigned the OrderItemType?

    4) In JDeveloper, close the files application and remove from the IDE by performing the following steps:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 2-1: Examine Purchase Order XML Schema (continued)

    Oracle SOA Suite 11g: Build Composite Applications 17

    a) In the Application Navigator, click the Application Menu icon, and select Close Application.

    b) In the Confirm Close Application dialog box, accept the default Close

    application and remove it from IDE option and click OK.

    5) In JDeveloper, close the po.xsd and internalorder.xsd windows.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 2-1: Examine Purchase Order XML Schema (continued)

    Oracle SOA Suite 11g: Build Composite Applications 18

    Practice 2-1: Answers The following table has been added for reference to collate the answers for some of the questions in the current practice: Step Answers 2c) The OrderItem > price element type is xsd:decimal. 2d) i) The payOption element type is payOptionType, and is values are: credit or

    paypal, as determined by the enumerated values defined by the type. 2d) ii) The repeating element name is item and its type is OrderItemType. 3a) The differences between the 1st

    In po.xsd

    level child elements of PurchaseOrder and order elements are represented by the following table:

    In internalorder.xsd CustId customerId ID orderId payOption, type:payOptionType payMethod, type:payMethodType shipChoice, type:shipOptionType shipMethod, type: shipMethodtype ccType and ccNumber, both string types

    creditCard, type:ccInfoType

    orderTotal Note: The payOptionType values are the same as the payMethodType values (as observed by the enumerated values in each schema). The same applies to the shipChoiceType and the shipMethodType definitions. If a single company is sharing these XSD definitions one could rearrange XML elements definitions to share a consistent type definitions.

    3b) The items element in the internalorder.xsd contains the additional child called inStock. Note: The inStock element is used to track if all items for a given order are in stock (value = true) so that an order can be fulfilled. If any item in the order is not in stock (value = false) then the whole order is place in a waiting status until stock for the ordered items become available, in which case the order is not fulfilled.

    3c) The differences between type definition for the item elements are represented in the following table: In po.xsd OrderItemType In internalorder.xsd

    itemType Product_Id prodId ProductName prodName Quantity qty itemTotal

    Note: The itemTotal is used as a line item total that is used to simplify the calculation of the orderTotal in the internalorder.xsd.

    3d) The item child element of the items element in the PurchaseOrder.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 19

    Practice 2-2: Examine soademo Database Tables and Data In this practice, you use the soademo Database Connection to locate the database tables and view supplied database data for customers, and credit cards. Feel free to explore additional tables (if you have time).

    1) In the JDeveloper window, click View > Database Navigator.

    2) In the Database Navigator, click the Expand (+) icon next to the soademo connection. Note: This action also opens a SQL Worksheet in a window named soademo, in which you can enter and execute SQL statements.

    3) Examine the CREDITCARDS database table structure and sample data by performing the following steps:

    a) In the Database Navigator, click the Expand (+) icon next to the Tables node

    b) Double-click the CREDITCARDS table. This expands the CREDITCARDS table entry and opens a tab page with a description of the columns.

    c) On the CREDITCARDS page, click the Data subtab at the bottom of the window to view the data in the table.

    d) Close the CREDITCARDS page, and soademo page.

    4) In the Database Navigator, right-click the soademo connection name, and select Disconnect

    5) Click the Application Navigator tab, and optionally close the Database Navigator.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 20

    Practices for Lesson 3 The goal of this practice is to create your first simple SOA composite application, which is the starting point for your course application. The initial POProcessing composite application assembly model should appear as shown in the following screenshot:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 21

    Practice 3-1: Create the POProcessing Composite In this practice, you create the POProcessing composite application composed of a Mediator component that routes the purchase order information to a file by using the File Adapter service reference. To complete this task perform the following steps:

    1) In the JDeveloper Application Navigator, click New Application.

    Create an Empty Composite Application 2) To create the application workspace with an SOA Project containing an empty

    composite application, use instructions in the following table and accept default values for all fields that are not specified in the Choices or Values column:

    Step Screen/Page Description

    Choices or Values

    a. Create SOA Application - Step 1 of 3

    Application Name: POApplication Application Template: SOA Application Click Next.

    b. Create SOA Application - Step 2 of 3

    Project Name: POProcessing Click Next.

    c. Create SOA Application - Step 3 of 3

    Composite Template: Empty Composite Click Finish.

    Note: Use the following screenshots as a guide for the corresponding steps in the table above.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 22

    a)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 23

    b)

    c)

    3) The composite.xml file is opened, and select File > Save All to save the changes

    to your Application and Project.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 24

    Create the Exposed Service Interface 4) In the composite.xml window, drag a Web Service component into the Exposed

    Services column.

    5) To configure the interface for the Web Service interface perform the steps in the following table:

    Step Screen/Page Description Choices or Values a. Create Web Service Name: ReceivePO

    Next to the WSDL URL field, click the

    Generate WSDL from schema(s) icon ( ). b. Create WSDL, on the

    Request tab Next to the URL field, click the browse schema file icon ( ). The second of the two icons.

    c. Type Chooser Click the Import Schema ( ) icon. d. Import Schema File Click the Browse Resources icon. e. SOA Resource Browser Locate the D:\labs\files\xsd folder and

    select po.xsd, and click OK. f. Import Schema File With the po.xsd file selected, click OK. g. Localize Files Copy Options: Deselect the Maintain original

    directory structure for imported files option, and click OK.

    h. Type Chooser Expand the Project Schema Files > po.xsd entry (if needed), select the PurchaseOrder entry, and click OK.

    i. Create WSDL Click OK. j. Create Web Services Click OK.

    Optionally, use the following screenshots as a guide for the steps in the above table:

    a)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 25

    b)

    c)

    d)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 26

    e)

    f)

    g)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 27

    h)

    i)

    j)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 28

    6) In the composite.xml window, verify that the ReceivePO icon appears in the Exposed Services column. For example:

    7) Select File > Save all to save the changes to the project.

    Create and Wire the Service Mediator Component 8) Create a Mediator component and wire the ReceivePO service entry point to the

    Mediator component, by performing the following steps:

    a) In the Composite Editor (composite.xml), drag a Mediator component into the Components column.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 29

    b) In the Create Mediator Component window, set the name to RoutePO and select the Define Interface Later template, and click OK.

    Note: The Mediator interface is defined by wiring the SOAP service to the Mediator component. The interfaces are implicit.

    c) Create a wire from the ReceivePO exposed service icon to the RoutePO Mediator icon, by dragging the right-edge arrow icon from the ReceivePO exposed service to the left-edge arrow on the Mediator component. Use the following image as a guide:

    9) Select File > Save, or click the Save All icon to save the changes to your application.

    Create a File Adapter as an External Reference You now create an external reference for the File Adapter to write the input message structure to a file in the file system.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 30

    10) Using the Windows Explorer, create a new subfolder called podata in the D:\labs folder.

    11) In the composite.xml window, drag a File Adapter component from the

    Component Palette on to the External References column.

    12) On the Adapter Configuration Wizard pages, use instructions in the following table to

    configure the File Adapter:

    Step Screen/Page Description Choices or Values a. Welcome Click Next. b. Service Name Service Name: WritePOFileService

    Click Next. c. Adapter Interface Select the Define from operation schema

    (specified later) option. Click Next.

    d. Operation Select the Write File option. Click Next.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 31

    Step Screen/Page Description Choices or Values e. File Configuration Directory for Outgoing Files:

    D:\labs\podata Note: You can click Browse to locate and select the specified folder. File Naming Convention: order_%SEQ%.xml Click Next.

    Note: If you require help to perform this task, use the following screenshots as a guide for steps in the table:

    a)

    b)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 32

    c)

    d)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 33

    e)

    13) On the Adapter Configuration Wizard page, continue to configure the File Adapter

    WSDL interface by importing the internalorder.xsd XML schema and selecting its order element, by performing the following steps:

    Step Screen/Page Description Choices or Values a. Messages Click Browse for schema file icon. b. Type Chooser Click the Import Schema ( ) icon. c. Import Schema File Click the Browse Resources icon. d. SOA Resource Browser In the D:\labs\files\xsd folder select

    internalorder.xsd, and click OK. e. Import Schema File With the internalorder.xsd file selected, click

    OK. f. Localize Files Copy Options: Deselect the Maintain original

    directory structure for imported files check box, and click OK.

    g. Type Chooser Expand the Project Schema Files > internalorder.xsd entry (if needed), select order, and click OK.

    h. Messages Click Next. i. Finish Click Finish.

    Note: If you require help to perform this task, use the following screenshots as a guide for the steps in the preceding table:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 34

    a)

    b)

    c)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 35

    d)

    e)

    f)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 36

    g)

    h)

    i)

    14) In the composite.xml file window, verify the File Adapter icon has been added to

    External References column.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-1: Create the POProcessing Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 37

    15) Create a wire from the Mediator component to the File Adapter by dragging the right-edge arrow of the Mediator component to the left-edge arrow on the File Adapter icon. Use the following image as a guide:

    16) Select File > Save All to save the changes to your project, and verify that your

    composite application matches the following diagram:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 38

    Practice 3-2: Add a Transformation to the Mediator Component In this practice, you create a transformation on the routing rule added due to wiring the RoutePO Mediator component to the WritePOFileService. An XSL transformation is required to ensure that the PurchaseOrder XML information is correctly copied to the format of the order XML structure required by the files written to disk by the WritePOFileService. To quickly create the transformation map required you use an XML dictionary map file called Order-Dictionary.xml in the XSLT Mapper. To complete this task perform the following steps:

    1) In the POProcessing composite.xml window, to edit the Mediator component double-click the RoutePO Mediator icon. Note: Alternatively, right-click the RoutePO Mediator icon and select Edit.

    2) In the RoutePO.mplan window, expand the routing rule section for the execute operation and click the Select an existing mapper file or create a new one ( ) icon, next to the Transform Using body: field.

    3) On the Request Transformation Map dialog box, select the Create New Mapper File

    option, and click OK.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-2: Add a Transformation to the Mediator Component (continued)

    Oracle SOA Suite 11g: Build Composite Applications 39

    4) In the PurchaseOrder_To_order.xsl XSLT Mapper window, map the PurchaseOrder source element to the order target element and their child elements using the Auto Map tool and the Order-Dictionary.xml dictionary file. Note: The XML namespace prefixes shown in the XML editor may differ from those shown in the screenshots. To perform this task use instructions in the following table:

    Step Screen/Page Description Choices or Values a. PurchaseOrder_To_order.xsl Drag the PurchaseOrder element in

    the source column and drop it onto the order element in the XSLT File: WritePOFileService.wsdl column.

    b. Auto Map Preferences Click Show Dictionaries. c. Auto Map Preferences Under Dictionaries field, Click Add. d. Open Navigate to folder

    D:\labs\files\xml, and select the file Order-Dictionary.xml Click Open.

    e. Auto Map Preferences Click OK to perform the automatic mapping operation with the dictionary applied.

    a)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-2: Add a Transformation to the Mediator Component (continued)

    Oracle SOA Suite 11g: Build Composite Applications 40

    b)

    c)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-2: Add a Transformation to the Mediator Component (continued)

    Oracle SOA Suite 11g: Build Composite Applications 41

    d)

    e)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-2: Add a Transformation to the Mediator Component (continued)

    Oracle SOA Suite 11g: Build Composite Applications 42

    5) In the PurchaseOrder_To_order.xsl window, expand the XML trees in the Source and XSLT File: WritePOFileService.wsdl columns and view the mappings created. Use the following screenshot as a guide:

    Note: At this time, there are no source elements that directly map to the orderPrice, items > inStock, items > item > itemTotals elements in the XSLT File: WritePOFileService.wsdl column. Mappings for these elements are done in a subsequent practice. The for-each construct is automatically inserted for the item element because it is a repeating element.

    6) Click the RoutePO.mplan window, and confirm that the Transform Using field shows the new mapping file. Use the following screenshot as a guide:

    7) Select File > Save All to save the changes to all files in the project. You can also

    close the PurchaseOrder_To_order.xsl window.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 43

    Practice 3-3: Deploy and Test the POProcessing Composite Application In this practice, you deploy and test the POProcessing composite application project to the SOA server and use the Enterprise Manager Web application to test the service with a sample input. To complete this task perform the following steps:

    Deploy the POProcessing Composite Application 1) In the JDeveloper Application Navigator, right-click the POProcessing project, and

    select Deploy > POProcessing > to > soaserver.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-3: Deploy and Test the POProcessing Composite Application (continued)

    Oracle SOA Suite 11g: Build Composite Applications 44

    2) On the SOA Deployment Configuration Dialog, accept default settings and click OK.

    3) Since this is the first time you are deploying an application in your JDeveloper

    session, the Authorization Request window is displayed. Enter weblogic in the Username field, welcome1 in the Password field, and click OK.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-3: Deploy and Test the POProcessing Composite Application (continued)

    Oracle SOA Suite 11g: Build Composite Applications 45

    4) Deployment processing starts. Monitor deployment progress and check for successful compilation in the SOA Log window, and verify that deployment is successful in the Deployment Log window, similar to what is shown in the following images:

    Test POProcessing using Enterprise Manager Web Interface In this section you use a Web browser to access the Oracle Enterprise Manager 11g Fusion Middleware Control and initiate a test of the deployed POProcessing application.

    5) Log in to Oracle Enterprise Manager 11g Fusion Middleware Control application and open a Web browser by performing the following steps:

    a) In the Web browser window, enter the URL http://localhost:7001/em.

    b) On the Oracle Enterprise Manager 11g Fusion Middleware Control login page, enter the User Name weblogic, and Password welcome1, and click Login.

    6) To initiate a test of the POProcessing composite, perform the following steps:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-3: Deploy and Test the POProcessing Composite Application (continued)

    Oracle SOA Suite 11g: Build Composite Applications 46

    a) On the Farm navigation pane, expand the SOA > soa-infra nodes in the tree and click the POProcessing [1.0] link.

    b) On the POProcessing [1.0] home page, click Test.

    7) On the Test Web Service page, scroll down to the Input Arguments section to the

    Request tab, select XML View and replace the initial XML contents with the XML data in the file D:\labs\files\xml_in\po-medium-ipod.xml. If you require help to replace the initial XML text, use the following steps (or similar):

    a) With JDeveloper, select File > Open and browse to the D:\labs\files\xml_in folder, select po-medium-ipod.xml and select Open.

    b) In the JDeveloper po-medium-ipod.xml window, press Ctrl +A to select all the text, and press Ctrl + C to copy the selection to the clipboard.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-3: Deploy and Test the POProcessing Composite Application (continued)

    Oracle SOA Suite 11g: Build Composite Applications 47

    c) On the POProcessing [1.0] Test Web Service page, place the cursor in the XML text area of the Input Arguments, and press Ctrl + A to select all the text and press Ctrl + V to paste it into the XML View replacing the initially supplied XML text. Use the following screenshot as a guide:

    d) On the POProcessing [1.0] Test Web Service page, Click Test Web Service.

    Note: This action sends the XML data as input message to the POProcessing composite application. It might take several seconds for the page to refresh with the response displayed in the Response tab. Please wait until the page is refreshed.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-3: Deploy and Test the POProcessing Composite Application (continued)

    Oracle SOA Suite 11g: Build Composite Applications 48

    IMPORTANT NOTE: When you click Test Web Service, you may the following saying, Input arguments validation failed and The test was not run as shown in the following image:

    If you see the above error dialog box, then perform the following steps to correct and resubmit the data:

    i) On the Input arguments validation failed dialog box, click OK. ii) On the Request tab, in Input Arguments section modify the contents of XML

    View field based on the following options:

    (1) If there is extra space or lines at the end of all the XML data, delete those spaces and lines ensuring the XML data is unaffected, and click Test Web Service, or

    (2) If there is no extra space or lines at the end of all the XML data, put the cursor or mouse pointer after the last character on the last line of the XML data, press Enter, and click Test Web Service

    Note: Throughout the rest of the course you may have to repeat this process as required when submitting XML data to initiate tests for each composite application.

    8) On the POProcessing [1.0] Response tab page, click the Launch Message Flow Trace link to view the results of the asynchronous composite application.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-3: Deploy and Test the POProcessing Composite Application (continued)

    Oracle SOA Suite 11g: Build Composite Applications 49

    9) On the Flow Trace page, verify that the ReceivePO, RoutePO, and WritePOFileService components have a Completed state indicating the application executed successfully.

    10) In a Windows Explorer window, navigate to the D:\labs\podata folder and

    examine the XML file created for the order.

    a) Ensure that the order_1.xml file has been created in the podata subfolder, as shown in the following image:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 3-3: Deploy and Test the POProcessing Composite Application (continued)

    Oracle SOA Suite 11g: Build Composite Applications 50

    b) Using JDeveloper open the order_1.xml file to view its contents and verify that the XML file contains similar (if not the same) data in the following image:

    c) In the JDeveloper window, close the order_1.xml and the po-medium-

    ipod.xml windows.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 51

    Practices for Lesson 4 The goal of this practice is to explore Oracle Enterprise Manager Fusion Middleware Control interface for managing an SOA composite application. Your tasks are to:

    Modify the File Adapter definition of the POProcessing application to use a logical name instead of a physical directory name for the location of writing files

    Set a reference property of the File Adapter to set the logical name value Deploy the updated POProcessing application and test that the order file is saved

    in the directory specified for the logical name Generate a configuration plan for the POProcessing project that redefines the

    value assigned to the logical name property for the File Adapter Validate the configuration plan Redeploy the POProcessing composite application with its new configuration plan

    by using Enterprise Manager. The above tasks are represented in the following image:

    You also test the changes to the deployed application and verify that an order data file is created in the new physical directory applied by the configuration plan.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 52

    Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name In this practice, you modify the POProcessing composite application and alter the File Adapter to use a logical name instead of an explicit directory for orders written to the file system. You then create a binding property that is to set the directory to the D:\labs directory, and deploy the application using JDeveloper and test the order is written to a file in the labs directory.

    Modify the File Adapter to use a Logical Name 1) In the JDeveloper window, select the POApplication in the application menu. Expand

    the POProcessing project and open the composite.xml file.

    2) In the POProcessing composite.xml window, edit the File Adapter external reference to use a logical name instead of a physical path. Use the following table of instructions as a guide:

    Step Screen/Page Description Choices or Values a. composite.xml Double-click the WritePOFileService

    external reference icon.

    b. Adapter Configuration Wizard

    Step 1 of 7 Welcome Click Next.

    c. Adapter Configuration Wizard Step 2 of 7 Service Name

    Click Next.

    d. Adapter Configuration Wizard Step 3 of 7 Adapter Interface

    Click Next.

    e. Adapter Configuration Wizard Step 4 of 7 Operation

    Click Next.

    f. Adapter Configuration Wizard Step 5 of 7 File Configuration

    Select the Logical Name option Directory for outgoing files (logical name): orderfiles Click Next.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name (continued)

    Oracle SOA Suite 11g: Build Composite Applications 53

    Step Screen/Page Description Choices or Values

    g. Adapter Configuration Wizard

    Step 6 of 7 Messages Click Next.

    h. Adapter Configuration Wizard Step 7 of 7 Finish

    Click Finish.

    3) To set the path value for the orderfiles logical name perform the following steps:

    a) In the composite.xml window, click the WritePOFileService external reference icon ensure that the File Adapter reference is selected.

    b) In the Property Inspector for the Reference WritePOFileService (in the lower right pane in the JDeveloper window), observe that JDeveloper has added a File Adapter reference property called orderfiles for the logical name.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name (continued)

    Oracle SOA Suite 11g: Build Composite Applications 54

    c) To set the orderfiles reference property default value to D:\labs, click in the Value cell next to the orderfiles reference property, enter the string value D:\labs and press Enter. Hint: You may wish to resize the Inspector Property window to view and modify the property.

    4) Select File > Save All to save the changes to the application.

    Deploy the Modified POProcessing Composite Application 5) In the JDeveloper window, deploy the modified POProcessing project by performing

    the following steps:

    a) In the Application Navigator, right-click POProcessing project name, and select Deploy > POProcessing > to > soaserver

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name (continued)

    Oracle SOA Suite 11g: Build Composite Applications 55

    b) In the SOA Deployment Configuration Dialog, select the Overwrite any existing composites with the same revision ID option, and click OK.

    c) In the Log window, observe the log messages to ensure that deployment is

    successful.

    Test the Modified POProcessing Composite Application 6) In a Web browser window, enter the Enterprise Manager URL

    http://localhost:7001/em, and login as weblogic with password welcome1.

    7) On the Enterprise Manager home page, locate and click the POProcessing [1.0] link under the Farm SOA > soa-infra folder.

    8) On the POProcessing [1.0] page, click Test. 9) On the POProcessing [1.0] Test Web Service page on the Request tab perform the

    following steps:

    a) In the Input Arguments section, in Tree View mode enter the following values: custID: 1 ID: 2 payOption: credit shipChoice: two_day status: Initial ccType: AMEX ccNumber: 1111-2222-3333-4444

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name (continued)

    Oracle SOA Suite 11g: Build Composite Applications 56

    Use the following image as a guide:

    b) While still in the Tree View mode, expand the items field, and in the item field (as

    shown above) enter the value 1 in the OrderItemTypeArray Size, and click the document icon.

    c) Expand the OrderItemTypeArray item and the OrderItemType item and enter the following field values, and then click Test Web Service.

    productId: SKU102 productName: Test Product price: 100 quantity: 1

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name (continued)

    Oracle SOA Suite 11g: Build Composite Applications 57

    Note: Use the following screenshot as a guide:

    10) On the POProcessing [1.0] Response tab page, click the Launch Message Flow

    Trace link.

    11) On the Flow Trace page, verify that the POProcessing composite application instance completed all processing successfully.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-1: Modify the POProcessing File Adapter to use a Logical Name (continued)

    Oracle SOA Suite 11g: Build Composite Applications 58

    12) Either using Windows Explorer or JDeveloper, navigate to the D:\labs folder and confirm that a file called order_1.xml has been created in the directory, and open the file to confirm that contains the values entered in the Enterprise Manager Web service test page form fields.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 59

    Practice 4-2: Generate and Validate a Configuration Plan In this practice, you create configuration plan for the POProcessing composite application to replace the destination directory for the orderfiles logical name reference property. After you verify the configuration plan, you redeploy the composite application by using the Enterprise Manager Web interface applying the configuration plan, verify and test the changes.

    Generate a Configuration Plan 1) In the Application Navigator with the POProcessing project expanded, right-click the

    composite.xml file and select Generate Config Plan.

    2) In the Composite Configuration Plan Generator dialog box, accept the default plan file name, and click OK.

    Note: The configuration plan file is generated into the project folder, and JDeveloper opens the POProcessing_cfgplan.xml file in its own window.

    3) In the POProcessing_cfgplan.xml window, scroll down until you locate the element, and append the text \podata to the value D:\labs contained in the element. The resulting element should be as follows:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-2: Generate and Validate a Configuration Plan (continued)

    Oracle SOA Suite 11g: Build Composite Applications 60

    D:\labs\podata

    Use the following image as a guide:

    4) Select File > Save All to save the changes to the project files.

    Validate the Configuration Plan 5) On the Application Navigator, right-click the composite.xml file and select

    Validate Config Plan.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-2: Generate and Validate a Configuration Plan (continued)

    Oracle SOA Suite 11g: Build Composite Applications 61

    6) In the Composite Configuration Plan Validator dialog box, accept the default selection and click OK.

    7) In the POProcessing_cfgplan_report.log window, verify that the orderfiles Reference Property is replaced with the new value of D:\labs\podata specified in the configuration plan being validated. Use the following image as a guide:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 62

    Practice 4-3: Test a Composite Deployed with a Configuration Plan In this practice, you redeploy the POProcessing composite application using the configuration plan file generated and validated in the previous practice. You also test the deployed application to confirm that the configuration plan changes are applied. To complete these tasks perform the following steps:

    1) Return to your Web browser with the Enterprise Manager page, and redeploy POProcessing composite application using the deployment plan file modified in the previous steps. To complete this task perform instructions in the following table

    Step Screen/Page Description

    Choices or Values

    a. Oracle Enterprise Manager SOA > soa-infra Farm tree

    Right-click the POProcessing [1.0] link and select SOA Deployment > Redeploy.

    b. POProcessing [1.0] Redeploy SOA Composite

    In the Archive or Exploded Directory section, select Archive is on the machine where this Web browser is running option, and click Browse.

    c. File Upload Navigate to the D:\labs\mywork\POApplication \POProcessing\deploy folder and select the sca_POProcessing_rev1.0.jar file, and click Open.

    d. POProcessing [1.0] Redeploy SOA Composite

    Under the Configuration Plan section, select the Configuration plan is on the machine where this Web browser is running option, and click Browse.

    e. File Upload Navigate to the D:\labs\mywork\POApplication\POProcessing folder and select the POProcessing_cfgplan.xml file, and click Open.

    f. POProcessing [1.0] Redeploy SOA Composite

    Scroll back to the top (if needed) and click Next.

    g. POProcessing [1.0] Redeploy SOA Composite

    Click Redeploy.

    Note: If you require help to perform this task, you can use the following screenshots as a guide to the instructions in the preceding table:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-3: Test a Composite Deployed with a Configuration Plan (continued)

    Oracle SOA Suite 11g: Build Composite Applications 63

    a)

    b)

    c)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-3: Test a Composite Deployed with a Configuration Plan (continued)

    Oracle SOA Suite 11g: Build Composite Applications 64

    d)

    e)

    f)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-3: Test a Composite Deployed with a Configuration Plan (continued)

    Oracle SOA Suite 11g: Build Composite Applications 65

    g)

    2) After the redeploy processing window is displayed and closed when the deployment

    successfully completes, click POProcessing [1.0] link in the Farm navigator tree to view the home page (if needed), and click the Show XML Definition icon.

    3) In the Definition window, locate the XML element with the

    name="orderfiles" attribute, and verify that the value is D:\labs\podata, as expected due to redeployment with the configuration plan. Then click OK to close the window.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-3: Test a Composite Deployed with a Configuration Plan (continued)

    Oracle SOA Suite 11g: Build Composite Applications 66

    Test the Redeployed POProcessing Composite Application Note: We have not modified the POProcessing composite application source code and have not even recreated the SOA Archive file during the redeployment process.

    4) Using Oracle Enterprise Manager to test that the POProcessing composite application now writes order files in the D:\labs\podata folder, as defined by the configuration plan, use instructions in the following table:

    Step Screen/Page Description Choices or Values a. POProcessing [1.0] Click Test b. POProcessing [1.0] Test Web

    Service In the Input Arguments Request tab section, select the XML View option, and replace the supplied XML data with the contents of the D:\labs\files\xml_in\po-small-ipod.xml file (using copy and paste techniques). Click Test Web Service

    Note: If you require help to perform this task, use these screenshots as a guide for instructions in the preceding table:

    a)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 4-3: Test a Composite Deployed with a Configuration Plan (continued)

    Oracle SOA Suite 11g: Build Composite Applications 67

    b)

    5) After verifying that the new POProcessing composite application instance completed

    successfully in the Flow Trace page, use Windows Explorer to verify that the order_1.xml file has been created with supplied data in the D:\labs\podata folder.

    Note: There is a chance that more than one XML file may exist in the podata subfolder. If that is the case, then the file with the highest sequence number contains the latest order information.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 68

    Practices for Lesson 5 The goal of this practice is to create the CreditCardValidation composite application that receives a credit card number and the purchase order total. The CreditCardValidation composite application validates the credit card using a Database Adapter service, which queries the CREDITCARDS table in an Oracle Database instance. Your tasks are to:

    Create a new SOA project for the CreditCardValidation composite application, using a Mediator component whose WSDL interface is based on the creditcheck.xsd schema elements

    Add and configure a Database Adapter into the composite application that performs a Select operation on the CREDITCARDS table to return the status and limit information for the given credit card number.

    Deploy and test the composite application The following image represents the composite application design for your CreditCardValidation project:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 69

    Practice 5-1: Create the CreditCardValidation SOA Project In this practice, you create a new SOA Project, called CreditCardValidation, in the POApplication workspace, which contains a Mediator component called ValidateCreditCard. To complete this task perform the following steps:

    1) In the JDeveloper Application Navigator window, with the POApplication visible in the Application menu, click the Application Menu icon and select New Project.

    2) In the New Gallery window, select the SOA Project in the Items list of the Project category, and click OK.

    3) In the Create SOA Project Step 1 of 2 Project Name window, enter the Project Name: CreditCardValidation, and click Next.

    4) In the Create SOA Project Step 2 of 2 Configure SOA Settings window, select the Composite With Mediator for the Composite Template option, and click Finish.

    Note: The Create Mediator window is opened after clicking Finish.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 70

    Configure the Mediator Component from a WSDL Definition 5) In the Create Mediator window, set the Name to ValidateCreditCard, and

    select Interface Definition from WSDL from the Template pull-down menu. Ensure that the Create Composite Service with SOAP Bindings check box is selected, and click the Generate WSDL from Schema(s). icon (next to the WSDL URL field). For example:

    Use the following image as a guide:

    Note: The Create WSDL window is opened.

    Define the Mediator WSDL Interface 6) To define the Request message for the Mediator component WSDL interface, use

    instructions in the following table as a guide (and use associated screenshots after the table):

    Step Screen/Page Description Choices or Values a. Create WSDL > Request Click the Browse icon next to the URL field. b. Type Chooser Click the Import Schema icon. c. Import Schema File Click the Browse icon. d. SOA Resource Browser Using the File System option, locate and

    select the creditcheck.xsd in the D:\labs\files\xsd folder, and click OK.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 71

    Step Screen/Page Description Choices or Values e. Import Schema File With the creditcheck.xsd selected,

    click OK. f. Localize Files Deselect the Maintain original directory

    structure for imported files option, and click OK.

    g. Type Chooser Expand the Project Schema Files > creditcheck.xsd nodes (if needed) and select the CreditCheckRequest element, and click OK.

    h. Create WSDL > Request Change the fields as follows: Operation Name: validateCC Port Type Name: validateCC_ptt Click the Reply tab. Note: Do not click OK.

    a)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 72

    b)

    c)

    d)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 73

    e)

    f)

    g)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 74

    h)

    7) On the Create WSDL > Reply tab page, to define the Reply message structure for the

    Mediator component WSDL interface, use instructions in the following table as a guide:

    Step Screen/Page Description Choices or Values a. Create WSDL > Reply Click the Browse icon next to the URL field. b. Type Chooser Expand the Project Schema Files >

    creditcheck.xsd nodes (if needed) and select the CreditCheckResponse element, and click OK.

    c. Create WSDL Click the Fault tab.

    a)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 75

    b)

    c)

    8) On the Create WSDL > Fault tab page, to define the Fault message structure for the

    Mediator component WSDL interface, use instructions in the following table as a guide:

    Step Screen/Page Description Choices or Values a. Create WSDL > Fault Click the Browse icon next to the URL field. b. Type Chooser Expand the Project Schema Files >

    creditcheck.xsd nodes (if needed) and select the CreditCheckFault element, and click OK.

    c. Create WSDL Click OK.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 76

    a)

    b)

    c)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-1: Create the CreditCardValidation SOA Project (continued)

    Oracle SOA Suite 11g: Build Composite Applications 77

    9) In the Create Mediator window, to create the Mediator component and its associated exposed service, verify the settings match the following screenshot with the Create Composite Service with SOAP Bindings check box selected, and click OK.

    10) In the JDeveloper window, click the composite.xml tab.

    11) In the composite.xml window, verify you initial composite assembly model resembles the following image:

    12) Select File > Save All to save your changes to the composite application project.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 78

    Practice 5-2: Create a Database Adapter to Query Credit Cards In this practice, you modify the CreditCardValidation composite application by creating a Database Adapter that queries the CREDITCARDS table using the credit card number supplied as input from the Mediator component. To create and configure the Database Adapter perform the following steps:

    1) In the CreditCardValidation composite.xml window, drag a Database Adapter on the External References column.

    2) To configure the Database Adapter with the Adapter Configuration Wizard the

    following instructions:

    a) Adapter Configuration Wizard Welcome, click Next.

    Step Screen/Page Description Choices or Values b. Adapter Configuration Wizard

    Service Name Service Name: CreditCardDBService Click Next.

    c. Adapter Configuration Wizard Service Connection

    Click the Browse (flashlight) icon next to the connection field.

    d. Select IDE Database Connection

    Select the soademo entry, and click Copy Connection.

    e. Adapter Configuration Wizard Service Connection

    Observe the JNDI Name has the value eis/DB/soademo, and click Next.

    f. Adapter Configuration Wizard Operation Type

    Select the Perform an operation on a Table option, and ensure the Select check box is selected, and deselect other operations. Click Next.

    g. Adapter Configuration Wizard Select Table

    Click Import Tables.

    h. Import Tables Click Query. i. Import Tables Copy the CREDITCARDS table from the

    Available list to the Selected list, click OK. j. Adapter Configuration Wizard

    Select Table With the CREDITCARDS table listed, click Next.

    k. Adapter Configuration Wizard Relationships

    Click Next.

    l. Adapter Configuration Wizard Attribute Filtering

    Select the creditLimit and status attribute options, deselect remaining options. Note: The cardNumber (key attribute) cannot be deselected. Click Next.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 79

    b)

    c)

    d)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 80

    e)

    f)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 81

    g)

    h)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 82

    i)

    j)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 83

    k)

    l)

    3) While still in the Adapter Configuration Wizard pages, configure the query

    parameters and selection criteria by using the following table of instructions:

    Step Screen/Page Description Choices or Values a. Adapter Configuration Wizard

    Define Selection Criteria Next to the Parameters section, click Add.

    b. Parameter Name Enter ccNum and click OK. c. Adapter Configuration Wizard

    Define Selection Criteria Next to the SQL field, click Edit.

    d. Expression Builder Click Add. e. Expression Builder Form the condition:

    cardNumber EQUAL ccNum, where: First Argument Query Key: cardNumber

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 84

    Step Screen/Page Description Choices or Values Operator: EQUAL Second Argument: select the Parameter option, and select ccNum Click OK.

    f. Adapter Configuration Wizard Define Selection Criteria

    Verify your SQL statement is correct, and click Next.

    g. Adapter Configuration Wizard Advanced Options

    Click Next.

    h. Adapter Configuration Wizard Finish

    Click Finish.

    a)

    b)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 85

    c)

    d)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 86

    e)

    f)

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 87

    g)

    h)

    Wire the Mediator to the DB Adapter and Create Transformations 4) In the composite.xml window, create a wire from the Mediator component to the

    Database adapter External Reference by dragging the right-edge arrow of the Mediator component to the left-edge arrow of the Database Adapter icon.

    5) Edit the Mediator component to add transformations, by either right-clicking the

    Mediator icon and selecting Edit, or double-clicking the Mediator icon.

    6) In the ValidateCreditCard.mplan window, for the validateCC operation expand the routing rule created by the wire.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 88

    7) In the ValidateCreditCard.mplan window, in the Static Routing Rule section click the Select an existing mapper file or create a new one icon for the request section.

    a) In the Request Transformation Map window, click the Create New Mapper File

    option, accept the default file name supplied, and click OK.

    b) In the XSLT Mapper window, map the CCNumber element in the Source column

    to the ccNum element in the target column, as shown in the following image:

    c) Save the changes to the XSLT Mapper file and project.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 89

    8) Click the ValidateCreditCard.mplan window, and in the Synchronous Reply section of the routing rule, click the Select an existing mapper file or create a new one icon.

    a) In the Reply Transformation Map window, select the Create New Mapper File

    option, accept the default file name supplied, and click OK.

    b) In the XSLT Mapper window, expand the source tree and map the status element

    in the Source column to the status element in the target column.

    c) Save the changes to the XSL file and your project.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-2: Create a Database Adapter to Query Credit Cards (continued)

    Oracle SOA Suite 11g: Build Composite Applications 90

    9) Verify the composite application assembly model resembles the following image:

    10) In the JDeveloper window, close the XSLT Mapper and the

    ValidateCreditCard.mplan windows.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 91

    Practice 5-3: Deploy and Test the CreditCardValidation Composite In this practice, you deploy and test the CreditCardValidation composite application. To complete this task perform the following steps:

    1) In the JDeveloper Application Navigator, right-click the CreditCardValidation project entry and select Deploy > CreditCardValidation > to > soaserver.

    a) In the SOA Deployment Configuration Dialog window, click OK. Note: If you get the Authorization Request window, enter the user name weblogic and password welcome1.

    b) In the Deployment Log window verify that deployment is successful. 2) In a Web browser window, access the URL http://localhost:7001/em (or return to the

    page that already has Enterprise Manager SOA page displayed). To perform the first test, login to the Enterprise Manager application (if required) as weblogic with password welcome1.

    a) On the Farm navigator pane, expand SOA > soa-infra (in needed refresh the page) so that you can see the CreditCardValidation [1.0] entry. Click the CreditCardValidation [1.0] link.

    b) On the CreditCardValidation [1.0] home page, click Test c) On the Test Web Service page, scroll down the page to the Input Arguments

    section Request tab and enter the following values: CCNumber: 1234-1234-1234-1234 amount: 1000 Click Test Web Service.

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Practice 5-3: Deploy and Test the CreditCardValidation Composite (continued)

    Oracle SOA Suite 11g: Build Composite Applications 92

    d) Wait for the Response tab to be displayed and verify that the status value returned is VALID, as shown in the following image:

    3) To perform a second test, to enter another request click the Request tab.

    a) On the Request tab page, modify the CCNumber value to be 4321-4321-4321-4321, leave the amount at 1000, and click Test Web Service.

    b) On the Response tab page, verify that the status string value returned is

    INVALID, as shown in the following image:

    Ora

    cle

    Inte

    rnal

    & O

    racl

    e A

    cade

    my

    Use

    Onl

    y

  • Oracle SOA Suite 11g: Build Composite Applications 93

    Practices for Lesson 6 The goal of this practice is work with Mediator components in the POProcessing composite application. The Mediator routing rules and XSL transformations are used to calculate the order item and order totals. The following image depicts the new assembly model and changes to the POProcessing composite application:

    As a result you learn how to:

    Manage service virtualization and how to restructure a composite assembly model with a new Mediator component and make changes to the component wires without affecting the exposed service (external client interface)

    Modify the XSL transformation, between the first and second Mediator components, to calculate the item totals. In this case, you reuse and modify the existing XSL Transformation.

    Create a new XSL Transformation, in the routing rule between the second Mediator and the WritePOFileService, to calculate the order total using the item totals already calculated by the XSL transformation between the Mediator components.

    Note: There are multiple solutions for calculating the item and order totals. One solution exists that uses a single XSL file without the need for an additional Mediator component. However, the single XSL file approach involves a higher degree of complexity and a detailed knowledge of XSL constructs, which can only be coded in the XSLT Mapper source and not visually constructed. Since the detailed explanation of the XSL constructs involved (call-template and recursion) is not in the scope of this course, the design approach used was chosen for its simplicity and the ability to provi


Recommended