Infolinks

Friday 6 July 2012

XDOLoader Utility to upload XML Templates

The XDOLoader utility is a Java-based command line program to load template (RTF, PDF, and XSL-FO), XML, and XSD files to the XML Publisher database tables. Before uploading any xml template you need to upload your concurrent program (if any) and data definitions through the FNDLOAD utility.
General Syntax to execute the XDOLoader utility as follows:
01% java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
02-DB_USERNAME <db_username> \
03-DB_PASSWORD <db_password> \
04-JDBC_CONNECTION <jdbc_con_string> \
05-LOB_TYPE <lob_type> \
06-APPS_SHORT_NAME <application_short_name> \
07-LOB_CODE <lob_code> \
08-LANGUAGE  \
09-TERRITORY  \
10-XDO_FILE_TYPE <xdo_file_type> \
11-NLS_LANG <NLS_LANG> \
12-FILE_CONTENT_TYPE <file_content_type> \
13-FILE_NAME <file_name> \
14-OWNER  \
15-CUSTOM_MODE [FORCE|NOFORCE] \
16-LOG_FILE <log file>
The parameters are described below:
  • UPLOAD (Mandatory): The first parameter: UPLOAD will be implemented in the feature.
  • DB_USERNAME (Mandatory): Database user name (example: apps).
  • DB_PASSWORD (Mandatory): Database user password (example: manager).
  • JDBC_CONNECTION (Mandatory): JDBC database connection string
    (example: ap000sun:1234:ebs).
  • LOB_TYPE (Mandatory):  XDO LOB type. Valid values are: ‘TEMPLATE’, ‘XML_SCHEMA’ and ‘XML_SAMPLE’
  • APPS_SHORT_NAME (Mandatory):  Application short name (example: AR).
  • LOB_CODE (Mandatory):  XDO LOB code. Enter either the Template Code or the Data Definition Code.
  • LANGUAGE (Optional): ISO two-letter language code (example: en).
  • TERRITORY (Optional): ISO two-letter territory code (example: US), default is ’00’.
  • XDO_FILE_TYPE (Mandatory):  Enter the XDO file type, valid values are: PDF, RTF, XLS, XSL-FO, XSL-HTML, XSL-XML, XSLTEXT, XSD, XML, RTF-ETEXT
  • NLS_LANG (Optional): Enter the NLS_LANG environment variable.
  • FILE_CONTENT_TYPE (Optional): Content type of the file (example: text/html, application/pdf)
  • FILE_NAME (Mandatory): Name of the file you want to upload. You can give full path name of the file.
  • OWNER (Optional): Owner of the template. Default is “ORACLE”.
  • CUSTOM_MODE (Optional): Whether to force update. Valid values are FORCE and NOFORCE (default).
  • LOG_FILE (Optional): Enter a file name for the output log file (default: xdotmpl.log).
Sample script to run the XDOLoader utility to upload a xml template:
01echo  "----------------------------------------------------------------------"
02echo  "Please enter the following details needed for the XML XDOLoad process"
03echo  "This details can be found in the TNS entry"
04echo  "----------------------------------------------------------------------"
05 
06echo "Enter Apps password  =>"
07read apps_pw
08 
09echo "Enter Host TNS Database Server name  =>"
10read v_host
11 
12echo "Enter Host Database TNS Port Number =>"
13read v_port
14 
15echo "Enter Host Database SID name =>"
16read v_sid
17 
18echo "Uploading rtf(XXFIN_SAMPLE_TEMPLATE.rtf) for the XML Template Definition"
19 
20java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
21-DB_USERNAME apps \
22-DB_PASSWORD $apps_pw \
23-JDBC_CONNECTION $v_host:$v_port:$v_sid \
24-LOB_TYPE TEMPLATE \
25-APPS_SHORT_NAME "IBY" \
26-LOB_CODE "XXFIN_TEMPLATE_CODE" \
27-LANGUAGE en \
28-XDO_FILE_TYPE RTF-ETEXT \
29-FILE_CONTENT_TYPE 'text/html' \
30-FILE_NAME "$XXFIN_TOP/templates/XXFIN_SAMPLE_TEMPLATE.rtf" \
31-CUSTOM_MODE FORCE
32 
33echo  "Finish uploading rtf(XXFIN_SAMPLE_TEMPLATE.rtf) for the XML Template Definition"
You can run the below query to see the details of your uploaded Template in the database.
SELECT * FROM
XDO_LOBS ORDER BY LAST_UPDATE_DATE DESC;
==============================================
The XDOLoader utility is a Java-based command line program to load template (RTF, PDF, and XSL-FO), XML, and XSD files to the XML Publisher database tables. Before uploading any xml template you need to upload your concurrent program (if any) and data definitions through the FNDLOAD utility.
General Syntax to execute the XDOLoader utility as follows:
01% java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
02-DB_USERNAME <db_username> \
03-DB_PASSWORD <db_password> \
04-JDBC_CONNECTION <jdbc_con_string> \
05-LOB_TYPE <lob_type> \
06-APPS_SHORT_NAME <application_short_name> \
07-LOB_CODE <lob_code> \
08-LANGUAGE  \
09-TERRITORY  \
10-XDO_FILE_TYPE <xdo_file_type> \
11-NLS_LANG <NLS_LANG> \
12-FILE_CONTENT_TYPE <file_content_type> \
13-FILE_NAME <file_name> \
14-OWNER  \
15-CUSTOM_MODE [FORCE|NOFORCE] \
16-LOG_FILE <log file>
The parameters are described below:
  • UPLOAD (Mandatory): The first parameter: UPLOAD will be implemented in the feature.
  • DB_USERNAME (Mandatory): Database user name (example: apps).
  • DB_PASSWORD (Mandatory): Database user password (example: manager).
  • JDBC_CONNECTION (Mandatory): JDBC database connection string
    (example: ap000sun:1234:ebs).
  • LOB_TYPE (Mandatory):  XDO LOB type. Valid values are: ‘TEMPLATE’, ‘XML_SCHEMA’ and ‘XML_SAMPLE’
  • APPS_SHORT_NAME (Mandatory):  Application short name (example: AR).
  • LOB_CODE (Mandatory):  XDO LOB code. Enter either the Template Code or the Data Definition Code.
  • LANGUAGE (Optional): ISO two-letter language code (example: en).
  • TERRITORY (Optional): ISO two-letter territory code (example: US), default is ’00’.
  • XDO_FILE_TYPE (Mandatory):  Enter the XDO file type, valid values are: PDF, RTF, XLS, XSL-FO, XSL-HTML, XSL-XML, XSLTEXT, XSD, XML, RTF-ETEXT
  • NLS_LANG (Optional): Enter the NLS_LANG environment variable.
  • FILE_CONTENT_TYPE (Optional): Content type of the file (example: text/html, application/pdf)
  • FILE_NAME (Mandatory): Name of the file you want to upload. You can give full path name of the file.
  • OWNER (Optional): Owner of the template. Default is “ORACLE”.
  • CUSTOM_MODE (Optional): Whether to force update. Valid values are FORCE and NOFORCE (default).
  • LOG_FILE (Optional): Enter a file name for the output log file (default: xdotmpl.log).
Sample script to run the XDOLoader utility to upload a xml template:
01echo  "----------------------------------------------------------------------"
02echo  "Please enter the following details needed for the XML XDOLoad process"
03echo  "This details can be found in the TNS entry"
04echo  "----------------------------------------------------------------------"
05 
06echo "Enter Apps password  =>"
07read apps_pw
08 
09echo "Enter Host TNS Database Server name  =>"
10read v_host
11 
12echo "Enter Host Database TNS Port Number =>"
13read v_port
14 
15echo "Enter Host Database SID name =>"
16read v_sid
17 
18echo "Uploading rtf(XXFIN_SAMPLE_TEMPLATE.rtf) for the XML Template Definition"
19 
20java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
21-DB_USERNAME apps \
22-DB_PASSWORD $apps_pw \
23-JDBC_CONNECTION $v_host:$v_port:$v_sid \
24-LOB_TYPE TEMPLATE \
25-APPS_SHORT_NAME "IBY" \
26-LOB_CODE "XXFIN_TEMPLATE_CODE" \
27-LANGUAGE en \
28-XDO_FILE_TYPE RTF-ETEXT \
29-FILE_CONTENT_TYPE 'text/html' \
30-FILE_NAME "$XXFIN_TOP/templates/XXFIN_SAMPLE_TEMPLATE.rtf" \
31-CUSTOM_MODE FORCE
32 
33echo  "Finish uploading rtf(XXFIN_SAMPLE_TEMPLATE.rtf) for the XML Template Definition"
You can run the below query to see the details of your uploaded Template in the database.


No comments:

Post a Comment