Wednesday, August 27, 2008

XML Sql Calls Concept

The XML Publisher data engine enables you to rapidly generate any kind of XML data structure against the Oracle database in a scalable, efficient manner. The data template is the method by which you communicate your request for data to the data engine. It is an XML document whose elements collectively define how the data engine will process the template to generate the XML.

Process of Overview of Implementing a Data Template for Use with the Concurrent Manager
The process overview for implementing a data template to be called by the Concurrent Manager is as follows

Using an XML or text editor:
• Write the data template XML document following the guidelines in this post.

Using the Template Manager:
• Create a Data Definition for the data template in the Template Manager. You will upload your data template to the Template Manager.
• Register any layout templates that you wish to apply to the data generated from your data template.

Using Oracle Applications System Administrator responsibility:
• Register the data template as a Concurrent Program in Oracle Applications noting the following:
• Designate "XDODTEXE" as the executable for your concurrent program. This is the XML Publisher Java concurrent program that will execute your data template.
• The Short Name that you assign to the program must match the Data Definition Code that you assigned to the data template in the Template Manager.
The XML Publisher executable uses the short name of the program to locate the corresponding data template in the Template Manager.

• Assign the concurrent program to an appropriate Request Group for your users to run.
When your user submits the request, the Concurrent Manager executes the XML Publisher Data Template Java concurrent program. The short name of the concurrent program is used to locate the appropriate data template in the Template Manager. When the data generation is complete, the Concurrent Manager’s Output Post Processor applies the layout template to the generated XML.

The Data Template Denition

The data template is an XML document that consists of four basic sections:
define parameters,
define triggers,
define data query,
define data structure.
This structure is shown in the following graphic:

As shown in the sample figure, the data template consists of a section
in which parameters are declared in child elements; a
section in which the SQL queries are defined in child elements; and a
section in which the output XML structure is defined.

Data Query Section
The section of the data template is required.
How to Dene Queries
The element is placed between the open and close dataQuery
tags. The element has a related attribute, name. It is expressed
within the tag. The query is entered in the CDATA section. For example:

How to Call a Data Template
There are two methods for calling the data engine to process your data template:
• Concurrent Manager
• Data Engine Java APIs
Before you can use either of these methods, you must first register your data template
in the Template Manager as a Data Definition.

Assigning a Default Template
You can assign a default template to the concurrent program that will be used by the
concurrent manager and XML Publisher to publish the report unless the user selects
a different template at runtime.
To assign a default template to a concurrent program:
1. Navigate to the Update Concurrent Program window (available from the System
Administration Responsibility).

No comments: