|
XMLImporter in Oracle Applications Framework |
| Print |
|
E-mail
|
|
Written by Anil Passi
|
|
Monday, 28 August 2006 |
Please find a sample script for XMLImporter. This can be used to load new XML Documents that you will be creating (using jDeveloper ) while building new screens using OAF ( Oracle Applications Framework ).
This script is quite generic and can be used with little modifications to move XML Document in OAF from one environment to another. Eventually, the XML data will be loaded into MDS Repository within tables JDR_ATTRIBUTES, JDR_COMPONENTS, JDR_PATHS & JDR_ATTRIBUTES_TRANS(if applicable). In order to Load the XML Document, you will require the Machine Name where the Oracle DB is hosted.
This script will require the DB port number and the machine name where XML Document is being loaded. For this I have written a simple Unix Function, given that the XMLImporter will be run from Unix in this example. This function was written to make this script machine independent. Surely there are other ways to fetch these values. However, I will be using below profile options :- Profile option "CSF: eLocation Map host name" to get the host name of Oracle Database. Profile option "CSF: Database port to receive data" to get the port number. Please ensure that these two profile options are set before invoking XMLImporter. On 11.5.7 onwards, you will certainly have values in these profiles.
getPortMachine() being a Unix function, connects to the database and populates two Unix Environment variables.
For simplicity, I have taken an example of a Standard XML Document from iProcurement. This will illustrate the full/relative path one needs to use in XMLImporter script The document in the example is located at $ICX_TOP/mds/por/req/webui/CheckoutSummaryPG.xml
############################# Script begins below #############################
MACHINE_NAME=0 PORT_NUMBER=0
export MACHINE_NAME export PORT_NUMBER
getPortMachine() { MACHINE_NAME=`sqlplus -s apps/$APPS_PWD <<EOF set pages 0 set lines 1023 select fnd_profile.value('CSF_EMAP_DS_HOST') from dual ; exit EOF`
PORT_NUMBER=`sqlplus -s apps/$APPS_PWD <<EOF set pages 0 set feed off select fnd_profile.value('CSF_MAP_DB_PORT') from dual ; exit EOF` }
getPortMachine
echo "**********************************" echo $MACHINE_NAME is Machine Name echo "**********************************" sleep 5 echo $PORT_NUMBER is port number echo "**********************************" sleep 5
"Echo import CheckoutSummaryPG.xml" adjava \ oracle.jrad.tools.xml.importer.XMLImporter $ICX_TOP/mds/por/req/webui/CheckoutSummaryPG.xml \ -rootdir $ICPO_TOP/bin \ -username apps \ -password $APPS_PWD \ -dbconnection "(description=(address_list=(address=(community=tcp.world)(protocol=tcp)(host=$MACHINE_NAME)(port=$PORT_NUMBER)))(connect_data=(sid=$TWO_TASK)))" \ -rootPackage /oracle/apps/icx/por/req/webui
############ End Of Script ############
Thanks, Anil Passi
|
What is the significance of rootDir and rootPackage options. rootDir seems to be a required option.
When I use different combination of these two, I get different qualified document names.
Kindly explain in details these two options.
Thanks-
Ashish.