Skip Headers
Oracle9
i
Case Studies - XML Applications
Release 1 (9.0.1)
Part Number A88895-01
Home
Solution Area
Index
Contents
Title and Copyright Information
Send Us Your Comments
Preface
About this Guide
Audience
Feature Coverage and Availability
How this Manual is Organized
Related Documentation
How to Order this Manual
Downloading Release Notes, Installation Guides, White Papers,...
How to Access this Manual On-Line
Conventions
Documentation Accessibility
What's New in Oracle XML-Enabled Technology?
XML Features Introduced with Oracle9
i,
Release 1 (9.0.1)
XML Features Introduced with Oracle8
i
Release 3 (8.1.7)
Part I Introducing Oracle XML-Enabled Technology
1 Oracle XML-Enabled Technology
What is XML ?
What are Oracle XML-Enabled Technologies?
Oracle XML Components
Storing and Retrieving XML Data from Oracle9
i
XML Support in the Database
XML and URI Data Types
Extensibility and XML
Oracle Text Searching
Oracle-Based XML Applications
Oracle XML-Enabled Technology Components and Features
Indexing and Searching XML Documents with Oracle Text (
inter
Media Text)
Messaging Hubs and Middle Tier Components
Back-End to Database to Front-End Integration Issues
Oracle XDKs Provide the Two Most Common APIs: DOM and SAX
Writing Custom XML Applications
The Oracle Suite of Integrated Tools and Components
Oracle JDeveloper and Oracle Business Components for Java (BC4J)
Oracle9i Internet File System (Oracle 9iFS or 9iFS)
Oracle Portal
Oracle Exchange
XML Gateway
Metadata API
Other XML Initiatives
Oracle XML Samples and Demos
What Is Needed to Run Oracle XML Components
Requirements for XDK
Which XML Components are Included with Oracle9i Database and Oracle9i Application Server?
XML Technical Support
2 Modeling and Design Issues for Oracle XML Applications
XML Data can be Stored as Generated XML or Composed XML
Generated XML
Composed (Authored/Native) XML
Using a Hybrid XML Storage Approach for Better Mapping Granularity
A Hybrid Approach Allows for User-Defined Storage Granularity
Hybrid Storage Advantages
Transforming Generated XML
Combining XML Documents and Data Using Views
Using XSLT to Transform Query Results
Indexing and Querying Transformations
Indexing Approaches
XML Schemas and Mapping of Documents
XMLSchema Example 1: Defining a Simple Data Type
XMLSchema Example 2: Using XMLSchema to Map Generated XML Documents to Underlying Schema
General XML: Design Issues for Data Exchange Applications
Generating a Web Form from XML Data Stored in the Database
Sending XML Data from a Web Form to the Database
Sending XML Documents Applications-to-Application
Loading XML into a Database
Using SQL*Loader
Loading XML Documents Into LOBs With SQL*Loader
Applications that Use Oracle XML -EnabledTechnology
Content and Document Management with Oracle XML-Enabled Technology
Customizing Presentation of Data
Scenario 1. Content and Document Management: Publishing Composite Documents Using XML-Enabled OracleTechnology
Scenario 2. Content and Document Management: Delivering Personalized Information Using Oracle XML Technology
Scenario 3. Content Management: Using Oracle XML Technology to Customize Data Driven Applications
Business-to-Business and Business-to-Consumer Messaging
Scenario 4. B2B Messaging: Online Multivendor Shopping Cart Design Using XML
Scenario 5. B2B Messaging: Using Oracle XML Components and Advanced Queueing for an Online Inventory Application
Scenario 6. B2B Messaging: Using Oracle XML-Enabled Technology and AQ for Multi-Application Integration
Part II Managing Content and Documents with XML
3 Oracle9
i
AS Wireless Edition and XML
Introducing Oracle9i AS Wireless Edition (Portal-to-Go)
Oracle9
i
AS Wireless Edition (Portal-To-Go) Features
What's Needed to Run Oracle9i AS Wireless Edition
Oracle9i AS Wireless Edition: Supported Devices and Gateways
How Oracle9i AS Wireless Edition Works
Oracle9i AS Wireless Edition Components
Oracle9i AS Wireless Edition Services
Oracle9i AS Wireless Edition Adapters
Oracle9i AS Wireless Edition Transformers
Exchanging Data via XML: Source to XML, XML to Target with Oracle9i AS Wireless Edition
Extracting Content
Converting to XML
Why Use an Intermediate XML Format?
Using the Simple Result DTD
Adapters Map the Source Content to the DTD Element
Sample Adapter Classes
Oracle9i AS Wireless Edition Adapter Example 1: Greeting Users by Name
Transforming XML to the Target Markup Language
Oracle9i AS Wireless Edition: Java Transformers
Oracle9i AS Wireless Edition Java Transformer Example 1: Converting Simple Result Elements to Another Format
Oracle9i AS Wireless Edition: XSL Stylesheet Transformers
Oracle9i AS Wireless Edition XSL Stylesheet Transformer Example 1: Converting Simple Result Documents to Plain Text
Each Markup Language Requires a Unique Transformer
Oracle9i AS Wireless Edition Stylesheet Transformer Example 2: Customizing a WML1.1 Transformer Stylesheet
Oracle9i AS Wireless Edition Stylesheet TransformerExample 3: XSL Java Extension
Oracle9i AS Wireless Edition Case Study 1: Extending Online Drugstore's Reach
Oracle9i AS Wireless Edition Case Study 2: Expanding Bank Services
Oracle9i AS Wireless Edition Case Study 3:Online Auction Sites
4 Customizing Presentation with XML and XSQL: Flight Finder
XML Flight Finder Sample Application: Introduction
What's Needed to Run XML Flight Finder
How Flight Finder Works
Flight Finder Queries the Database -- Converts Results to XML
Using XSQL Servlet to Process Queries and Output Result as XML
Formatting XML with Stylesheets
One Stylesheet, One Target Device
Many Stylesheets, Many Target Devices
Localizing Output
XML to Database
1 Taking the User's Input
2 Assign Values Acquired From User to Code Parameters
3 Let User Know if Operation Succeeded
Using Oracle9i Application Server Wireless Edition (Portal-to-Go)
5 Customizing Content with XML: Dynamic News Application
Introduction to the Dynamic News Application
Dynamic News Main Tasks
Overview of the Dynamic News Application
Dynamic News SQL Example 1: Item Schema, nisetup.sql
Dynamic News Servlets
How Dynamic News Works: Bird's Eye View
Static Pages
Semi-Dynamic Pages
Dynamic Pages
Personalizing Content
1 Get End-User Preferences
From a Client-Side Cookie
Querying the Database
2 Pull News Items from the Database
3 Combine News Items to Build a Document
4 Customizing Presentation
Importing and Exporting News Items
6 Using Oracle9i Internet File System (9iFS) to Build XML Applications
Introducing Oracle9i Internet File System (9iFS)
Working with XML in
9iFS
Supply a Document Descriptor
Using the
9i
FS
Parsers
Standard 9iFS Parsers and Custom Parsers
Using
9iFS
Standard Parsers
Parsing Options
Using
9iFS
Custom Parsers
How
9iFS
XML Parsing Works
Writing a Parser Application
Rendering XML in
9iFS
XML and Business Intelligence
Configuring
9iFS
with XML Files
Part III XML Data Exchange
7 Customizing Discoverer 4i Viewer with XSL
Discoverer4i Viewer: Overview
Discoverer 4i Viewer: Features
Discoverer 4i Viewer: Architecture
How Discoverer 4i Viewer Works
Replicating Discoverer Application Server
Using Discoverer 4i Viewer for Customized Web Applications
Step 1: Browser Sends URL
Step 2: Servlet Generates XML
Discoverer XML Example 1: Three Workbook Report Data
Step 3: XSLT Processor Applies an XSL Stylesheet
Step 4: XSLT Processor Generates HTML
Customizing Style by Modifying an XSL Stylesheet File: style.xsl
Discoverer 4i Viewer: Customization Example Using XML and XSL
Step 1: The XML File
Step 2: XSL File, example1.xsl
Step 3: XML+XSL = HTML
Step 4: Customizing the XSL Stylesheet (example2.xsl)
Frequently Asked Questions (FAQs): Discoverer 4i Viewer
Explaining Servlets
How Discoverer 4i Viewer Communicates with Browsers
Discoverer 4i Viewer and XML
disco4iv.xml
Discoverer 4i and XSL
Supported XSLT Processors
XSL Editors
Customizing Stylesheets
Viewing Changes to a Modified Stylesheet
Browser Displays Blank Screen
More information on XML and XSL
Discoverer Viewer XML's DTD
8 Online B2B XML Application: Step by Step
Introduction to the Online B2B XML Application
Requirements for Running the Online B2B XML Application
Building the Online B2B XML Application: Overview
Why Transform Data to XML?
Why Use Advanced Queueing (AQ)?
Online B2B XML Application: Main Components
Overview of Tasks to Run the Online B2B XML Application
Task 1. Set Up Your Environment to Run the Online B2B XML Application
Task 2. Run the B2B Application
Task 3. End the B2B Application Session
Online B2B XML Application: Setting Up the Database Schema
SQL Code Calling Sequence
Create and Build the Retailer and Supplier Schemas
SQL Example 1: Set up the Retailer and Supplier Environment -- BuildAll.sql
SQL Example 2: Create and Populate the Retailer-Supplier Schema -- BuildSchema.sql
Create the AQ Environment and Queue Tables
SQL Example 3: Set Up the Environment for AQ -- mkAQUser.sql
SQL Example 4: Call the AQ Queue Creation Scripts -- mkQ.sql
SQL (PL/SQL) Example 5: Create Table, AppOne_QTab -- mkQueueTableApp1.sql
SQL (PL/SQL) Example 6: Create Table, AppTwo_QTab -- mkQueueTableApp2.sql
SQL (PL/SQL) Example 7: Create Table, AppThree_QTab -- mkQueueTableApp3.sql
SQL (PL/SQL) Example 8: Create Table, AppFour_QTab -- mkQueueTableApp4.sql
Create the Broker Schema Including XSL Stylesheet Table
SQL Example 9: Create Broker Schema -- mkSSTables.sql
SQL (PL/SQL) Example 10: Input XSL data into CLOB. Populate the Broker Schema -- setup.sql
Cleaning Up Your Environment and Preparing to Rerun Application
SQL Example 11: Stops and Drops Queue Applications. Starts Queue Applications -- reset.sql
Stop Queue SQL Scripts
Drop Queue SQL Scripts
Create Queue SQL Scripts
Start Queue SQL Scripts
dropOrder.sql
Online B2B XML Application: Data Exchange Flow
Retailer-Supplier Transactions
Step 1. Retailer Browses the Supplier's OnLine "Hi-Tech Mall" Catalog
Step 2. Retailer Places Order
Step 3. Retailer Confirms and Commits to Sending the Order
Step 4. AQ Broker-Transformer Transforms the XML Document According to the Supplier's Format
Step 5. Supplier Application Parses Incoming Reformatted XML Order Document. Inserts Order into the Supplier Database
Step 6. Supplier Application Alerts Supplier of Pending Order
Step 7. AQ Broker-Transformer Transforms the XML Order According to Retailer's Format
Step 8. Retailer Application Updates the Ord and Line_Item Tables
Running the B2B XML Application: Detailed Procedure
Step 1. Retailer Browses the Supplier's OnLine "Hi-Tech Mall" Catalog
XSQL Script Example 2: Checking the ID of Users Logging In: getlogged.xsql
XSQL Script Example 1: Displays First Hi-Tech Mall Screen -- index.xsql
XSQL Script Example 3: Lists Catalog Products -- inventory.xsql
XSQL Script Example 4: Enter a Quantity -- order.xsql
Step 2. Retailer Places Order
Step 3. "Validate" Commits the Transaction. Retailer Application Produces the XML Order
XSQL Script Example 5: Starts B2B Process -- placeorder.xsql
Java Example 1: Action Handler Called by placeOrder.xsql -- RetailActionHandler.java
Java Example 2: Maintains Session Context for RetailActionHandler.java -- SessionHolder.java
Step 4. AQ Broker-Transformer Transforms XML Document According to Supplier's Format
Step 5. Supplier Application Parses the XML Document and Inserts the Order into the Supplier Database
Step 6a. Supplier Application Alerts Supplier of Pending Order
Step 6b. Supplier Decides to Ship the Product(s) to the Retailer
Step 6c. Supplier Application Generates a New XML Message to Send to AQ Broker
Step 7. AQ Broker-Transformer Transforms XML Order into Retailer's Format
Step 8. Retailer Application Updates the Ord Table and Displays the New Order Status to Retailer
To Stop the B2B XML Application
Check Your Order Status Directly Using vieworder.sql
Java Examples - Calling Sequence
XSL and XSL Management Scripts
XSL Stylesheet Example 1: Converts Results to HTML -- html.xsl
XSL Stylesheet Example 2: Converts Results for Palm Pilot Browser -- pp.xsl
Java Example 3: Stylesheet Management-- GUIInterface.java
Java Example 4: GUIInterface_AboutBoxPanel.java
Java Example 5: GUIStylesheet.java
XML Process and Management Scripts
Java Example 6: Main4XMLtoDMLv2.java
Java Example 7: ParserTest.java
Java Example 8: TableInDocument.java
Java Example 9: XMLFrame.java
Java Example 10: XMLProducer.java
Java Example 11: XMLtoDMLv2.java
Java Example 12: XMLGen.java
Java Example 13: XMLUtil.java
Java Example 14: XSLTWrapper.java
Other Scripts Used in the B2B XML Application
XML Example 1: XSQL Configuration -- XSQLConfig.xml
Java Example 15: Message Header Script -- MessageHeaders.java
Java Example 16: Hold Constants for Use by Message Broker -- AppCste.java
Retailer Scripts
Java Example 17: Retailer Waits for Status Update Sent from Supplier -- UpdateMaster.java
AQ Broker-Transformer and Advanced Queuing Scripts
Java Example 18: AQ Broker Listens on One AQ Thread -- BrokerThread.java
Java Example 19: MessageBroker.java
Java Example 20: AQReader.java
Java Example 21: AQWriter.java
Java Example 22: B2BMessage.java
Java Example 23: ReadStructAQ.java
Java Example 24: StopAllQueues.java
Java Example 25: WriteStructAQ.java
Supplier Scripts
Java Example 26: SupplierFrame.java
Java Example 27: Agent Wakes Up with Order Received from Retailer -- SupplierWatcher.java
9 Service Delivery Platform (SDP) and XML
Oracle Service Delivery Platform
SDP Business Solutions
Phone Number Portability
The Number Portability Process
What Happens Behind the Scenes When You Order a New Telephone Service
What Happens Behind the Scenes When You Change Local Service Providers
XML is the Data Format. Advanced Queuing is Used at Each Point
Why XML is Used for this Messaging
Number Portability Allows Fast Configuring
What are External Adapters?
Terms Used in This Chapter
Wireless Number Portability (WNP)
NPAC
Service Gateway
Asymmetric Digital Subscriber Line (ADSL)
Voice Over IP (Clarent)
Bandwidth Exchange (Prototype)
Number Portability and Messaging Architecture within SDP
Communication Protocol Adapter
Order Processing Engine
Workflow Engine
Fulfillment Engine
Event Manager
SDP Repository
Requirements for Building a Phone Number Portability Application
Provisioning a Network Element
Using Internet Message Studio (
i
Message) to Create an Application Message Set
Code Generation
Defining Message Sets
Using Timer Manager
A An XML Primer
What is XML?
W3C XML Recommendations
XML Features
How XML Differs From HTML
Presenting XML Using Stylesheets
eXtensible Stylesheet Language (XSL)
Cascading Style Sheets (CSS)
Extensibility and Document Type Definitions (DTD)
Well-Formed and Valid XML Documents
Why Use XML?
Additional XML Resources
Glossary
Index
Copyright © 1996-2001, Oracle Corporation.
All Rights Reserved.
Home
Solution Area
Index