XML Publisher API
any hint about those libraries?
THX
Are you asking about the following;
http://www.oracle.com/technology/products/xml-publisher/xmlpdocs.html
Adith
Similar Messages
-
How to trigger xml publisher API (ex:Delivering Documents via e-Mail)?
Dear All:
How to use xml publisher API ?
In user's guide always talk API's code.(ex:Delivering Documents via e-Mail
// create delivery manager instance
DeliveryManager dm = new DeliveryManager();
// create a delivery request
DeliveryRequest req =
dm.createRequest(DeliveryManager.TYPE_SMTP_EMAIL);
// set email subject
req.addProperty(DeliveryPropertyDefinitions.SMTP_SUBJECT, "Invoice");
// set SMTP server host
req.addProperty(
DeliveryPropertyDefinitions.SMTP_HOST, "mysmtphost");
// set the sender email address
req.addProperty(DeliveryPropertyDefinitions.SMTP_FROM,
"[email protected]");
// set the destination email address
req.addProperty(
DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS,
"[email protected], [email protected]" );
// set the content type of the email body
req.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_TYPE,
"text/html");
// set the document file name appeared in the email
req.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME,
"body.html");
// set the document to deliver
req.setDocument("/document/invoice.html");
// submit the request
req.submit();
// close the request
req.close(); )
Not say how to use this code to account effect !!
Having anybody to use API before?
Please tell me how to use that,thanks!!
BY Emily_yeHi Emily
I had the same question. After much research and a lot of deduction I produced the following:
import oracle.apps.fnd.cp.request.*;
import java.io.*;
import java.sql.*;
import java.util.Vector;
import oracle.apps.fnd.util.*;
import oracle.apps.xdo.XDOException;
import oracle.apps.xdo.common.pdf.util.PDFDocMerger;
import oracle.apps.xdo.delivery.DeliveryException;
import oracle.apps.xdo.delivery.DeliveryManager;
import oracle.apps.xdo.delivery.DeliveryPropertyDefinitions;
import oracle.apps.xdo.delivery.DeliveryRequest;
import oracle.jdbc.driver.OracleCallableStatement;
public class RunTravProgram implements JavaConcurrentProgram {
CpContext mCtx; // global reference to concurrent program context
LogFile logFile; // global reference to context logfile
OutFile outFile; // global reference to context outfile
Connection mConn = null;
ReqCompletion lRC;
//File Separator
private String mFileSeparator;
// globals for template
String XDOAppShortName = "";
String XDOtemplateCode = "";
// hard-wired constants for template addition
final String XDOLanguage = "en";
final String XDOTerritory = "US";
final String XDOFinal_format = "PDF";
final String XDOtemplateType = "TEMPLATE_SOURCE";
String PDFFile = "";
String outFilePath = "";
String progShortName = "";
String progDesc = "";
Integer iRequestID = 0;
String sWatermark = ""; // watermark text
String emailAddress = ""; // Not Implemented
String emailServer = "";
public static final String M_SUCCESS = "SUCCESS";
public static final String M_ERROR = "ERROR";
public static final String M_WARNING = "WARNING";
* Create a Java FND ConcurrentRequest objec to call fnd_request.submit_request
* The first three parameters are:
* Application Short Name -- Application Short name (ie. WAHC)
* Current Program Short Name -- Concurrent Program being called
* Current Program Description -- description for above
* These should be the first three parameters passed by the concurrent
* program in this order. The next two are constants set to null
* These are followed by the parameters passed by the first concurrent
* program that are being passed to the next concurrent program.
* I am limiting the parameter list to ten for now.
// Dynamic PLSQL statement used to get a concurrent request completion status
// This is necessary because the java class does not provide this method :-(
String mGetCompleteStatus =
"DECLARE R_VAL BOOLEAN; " + "b_phase VARCHAR2 (80) := NULL; " +
"b_status VARCHAR2 (80) := NULL; " +
"b_dev_phase VARCHAR2 (80) := NULL; " +
"b_dev_status VARCHAR2 (80) := NULL; " +
"b_message VARCHAR2 (240) := NULL; " + "BEGIN " +
"r_val := fnd_concurrent.wait_for_request (:1,5,1000," +
"b_phase,b_status,b_dev_phase,b_dev_status,b_message); " +
":2 := b_phase; " + ":3 := b_status; " + ":4 := b_message; " + "end;";
public RunTravProgram() {
// no constructor necessary for now
* Concurrent Processing provides an interface 'JavaConcurrentProgram' with abstract method
* runProgram() which passes the concurrent processing context 'CpContext'. The concurrent
* program developer will implement all of their business logic for a concurrent program in
* runProgram(). The main() method, implemented by AOL, will call runProgram() after
* performing all of the required initialization for the concurrent program, including
* establishing a database connection, initializing the required contexts, and setting up
* the log and output files. CpContext will have the request specific log and output
* file input methods
public void runProgram(CpContext pCpContext) {
mCtx = pCpContext;
OracleCallableStatement lStmt = null;
boolean bCompletion = true;
String sPhase = "";
String sStatus = "";
String sMessage = "";
//get handle on request completion object for reporting status
lRC = pCpContext.getReqCompletion();
// assign logfile
logFile = pCpContext.getLogFile();
// assign outfile
outFile = pCpContext.getOutFile();
// assign fileseparator
mFileSeparator = getFileSeparator();
// get the JDBC connection object
mConn = pCpContext.getJDBCConnection();
outFilePath =
((new File(outFile.getFileName())).getParent() == null ? "" :
(new File(outFile.getFileName())).getParent() +
mFileSeparator);
logFile.writeln("OutFile File Path: -> " + outFilePath, 0);
// get parameter list object from CpContext
// these come from the concurrent program
ParameterList lPara = pCpContext.getParameterList();
// create a temporary array and retrieve the parameters created by
// the program. Currently limiting the number of parameters to 10 for now
String pvals[] = new String[10];
int pcount = 0;
while (lPara.hasMoreElements()) {
NameValueType aNVT = lPara.nextParameter();
pvals[pcount] = aNVT.getValue();
pcount++;
if (pcount > 9)
break;
// send parameter values to the log file
logFile.writeln("Arg 1: APPL_SHORT_NAME -> " + pvals[0], 0);
logFile.writeln("Arg 2: CURR_PROG_SHORT_NAME -> " + pvals[1], 0);
logFile.writeln("Arg 3: CURR_PROG_DESCRIPTION -> " + pvals[2], 0);
logFile.writeln("Arg 4: TEMPLATE_CODE -> " + pvals[3], 0);
logFile.writeln("Arg 5: P_PLANT_CODE -> " + pvals[4], 0);
logFile.writeln("Arg 6: P_BATCH_NO -> " + pvals[5], 0);
logFile.writeln("Arg 7: P_SHOW_PROMISE -> " + pvals[6], 0);
logFile.writeln("Arg 8: P_WATERMARK -> " + pvals[7], 0);
XDOtemplateCode = pvals[3]; // store the template name globally
progShortName = pvals[1]; // store the program short name globally
XDOAppShortName = pvals[0]; // store the application short name
sWatermark = pvals[7]; // store the watermark globally
progDesc = pvals[2];
try {
// create a concurrent request object
ConcurrentRequest cr = new ConcurrentRequest(mConn);
// use the parameters to call fnd_request.submit_request
cr.addLayout(XDOAppShortName, XDOtemplateCode, XDOLanguage,
XDOTerritory, XDOFinal_format);
Vector param = new Vector();
param.add(pvals[4]); // plant code
param.add(pvals[5]); // batch ID
param.add(pvals[6]); // Show SO info flag
iRequestID =
cr.submitRequest(XDOAppShortName, progShortName, progDesc,
null, false, param);
mConn.commit();
// send the request ID to the log file
logFile.writeln("-- Request ID: ->" + Integer.toString(iRequestID),
0);
// call fnd_concurrent.wait_for_request to wait until the request
// has ended - use this to check the request status before proceeding
lStmt =
(OracleCallableStatement)mConn.prepareCall(mGetCompleteStatus);
lStmt.setInt(1, iRequestID);
lStmt.registerOutParameter(2, java.sql.Types.VARCHAR, 0, 255);
lStmt.registerOutParameter(3, java.sql.Types.VARCHAR, 0, 255);
lStmt.registerOutParameter(4, java.sql.Types.VARCHAR, 0, 255);
lStmt.execute();
// get the results of the completion
sPhase = lStmt.getString(2);
sStatus = lStmt.getString(3);
sMessage = lStmt.getString(4);
lStmt.close();
// send the results of the request processing to the log file
logFile.writeln("-- Phase: -> " + sPhase, 0);
logFile.writeln("-- Status: -> " + sStatus, 0);
logFile.writeln("-- Message: -> " + sMessage, 0);
// test here to make sure it completed correctly
if (sPhase.equals("Completed") && sStatus.equals("Normal")) {
// construct the PDF file name generated by the called request
PDFFile = progShortName + "_" + iRequestID + "_1.pdf";
// add a watermark to the generated PDF
// create an output stream for the existing PDF
// and set ouput to append
OutputStream pdfout =
new FileOutputStream(outFilePath + PDFFile, true);
// create an inputstream array (required by calling method)
InputStream pdfin[] = new InputStream[1];
pdfin[0] = new FileInputStream(outFilePath + PDFFile);
// add the watermark passed as a parameter
bCompletion = addWatermark(pdfin, pdfout);
// assign the modified file to the context out
// this will print using this request
if (bCompletion)
outFile.setOutFile(outFilePath + PDFFile);
// release the connection object
// and set the completion status for the request
if (bCompletion) {
pCpContext.getReqCompletion().setCompletion(ReqCompletion.NORMAL,
} else {
lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
pCpContext.releaseJDBCConnection();
} catch (SQLException s) {
logFile.writeln("SQL Error: Exception thrown w/ error message: " +
s.getMessage(), 0);
lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
pCpContext.releaseJDBCConnection();
} catch (IOException ioe) {
logFile.writeln("IO Error: Exception thrown w/ error message: " +
ioe.getMessage(), 0);
lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
pCpContext.releaseJDBCConnection();
} catch (Exception e) {
logFile.writeln("General Exception: " + e.getMessage(), 0);
lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
pCpContext.releaseJDBCConnection();
} finally {
try {
if (lStmt != null)
lStmt.close();
pCpContext.releaseJDBCConnection();
} catch (SQLException e) {
logFile.writeln(e.getMessage(), 0);
lRC.setCompletion(ReqCompletion.WARNING, M_WARNING);
* addWatermark()
* @param pdfin
* @param pdfout
* @return boolean
* This method will work for an existing document or a newly generated
* one. Set the outputstream append flag to false for a new document
* and true for an existing one.
* NOTE: PDFDocMerger requires an inputstream array even if it only
* contains one document.
private boolean addWatermark(InputStream[] pdfin, OutputStream pdfout) {
if (!sWatermark.equals("")) {
try {
PDFDocMerger docMerger = new PDFDocMerger(pdfin, pdfout);
//docMerger.setTextDefaultWatermark(sWatermark);
docMerger.setTextWatermark(sWatermark, 80f, 50f);
docMerger.setTextWatermarkAngle(25);
docMerger.setTextWatermarkColor(1.0f, .50f, .50f);
docMerger.setTextWatermarkFont("Garamond", 100);
docMerger.process();
docMerger = null;
return true;
} catch (XDOException e) {
logFile.writeln("Watermark process Failed: " + e.getMessage(),
0);
return false;
return true;
* Returns the file separator
private String getFileSeparator() {
return (System.getProperty("file.separator"));
* EBSEmailDelivery
* @return
* Just for testing right now.
private boolean EBSEmailDelivery() {
if (!emailAddress.equals("")) {
try {
// create delivery manager instance
DeliveryManager delMgr = new DeliveryManager();
// create a delivery request
DeliveryRequest delReq =
delMgr.createRequest(DeliveryManager.TYPE_SMTP_EMAIL);
// set email subject
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_SUBJECT,
"EBS Report:" + progDesc +
" for request: " + iRequestID);
// set SMTP server host
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_HOST,
emailServer); // need to supply the email smtp server
// set the sender email address
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_FROM,
emailAddress);
// set the destination email address
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_TO_RECIPIENTS,
emailAddress);
// set the content type of the email body
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_TYPE,
"application/pdf");
// set the document file name appeared in the email
delReq.addProperty(DeliveryPropertyDefinitions.SMTP_CONTENT_FILENAME,
PDFFile);
// set the document to deliver
delReq.setDocument(outFilePath + PDFFile);
// submit the request
delReq.submit();
// close the request
delReq.close();
return true;
} catch (DeliveryException de) {
logFile.writeln("email process Failed: " + de.getMessage(), 0);
return false;
return true;
This is the class for a JCP I created to perform the following:
1) Launch an existing Concurrent Program that produces PDF output
2) Grab the PDF and apply a watermark based on user input or conditions
3) associate the modified PDF to CP output for PASTA printing
It isn't elegant but it is fairly simple. I added the email capability and tested it but am not implementing it at the present time.
there is a fair amount of information out there that explains how to create a JCP councurrent program but very little that demonstrates the class needed.
I hope this helps -
XML publisher API registration
Hai,
Can anyone tell me the procedures to be followed for calling a XML publisher APIs in EBS to get certain output format?
Thanks in Advance.The document
XML Publisher 5.6.2 Core Components APIs
can be found here:
http://www.oracle.com/technology/products/xml-publisher/xmlpdocs.html -
Hi,
I am looking for complete XML Publisher Java API Docs. Any pointers would be helpful.
Thanks in Advance
~NeerajThe document
XML Publisher 5.6.2 Core Components APIs
can be found here:
http://www.oracle.com/technology/products/xml-publisher/xmlpdocs.html -
Where to find - javadocs for XML Publisher' API
The XML Publisher User's Guide section, called Implementation and Developer's Guide->Application Layer APIs, has examples of API's for inserting Templates and Data Definitions.
Unfortunately, XML publisher manual only provides a bunch of
samples and not the detailed javadocs, that wee need.
Where could we find javadoc for XML Publisher?Hi
You did not specify which version you were on but the java docs are linked from the relevant About Doc for each release:
Release 5.5 Note 316447.1
Release 5.0 Note 295036.1
Release 4.5 Note 269605.1
Just search for 'javadoc' in these docs for the link
Regards, Tim -
XML Publisher APIs problem.
Hi friends!
I need to convert RTF files into XSL. So I'm running the following simple code:
RTFProcessor rtfProcessor1 = new RTFProcessor("c:\\example.rtf");
rtfProcessor1.setOutput("c:\\example.xsl");
rtfProcessor1.process();
but i'm getting the following error:
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:333)
at oracle.apps.xdo.template.rtf.group.RTFStyleSheetGroup.endgroup(RTFStyleSheetGroup.java:553)
at oracle.apps.xdo.template.rtf.RTF2XSLParser.endgroup(RTF2XSLParser.java:1008)
at oracle.apps.xdo.template.rtf.io.RTFFilter.write(RTFFilter.java:206)
at oracle.apps.xdo.template.rtf.io.Filter.write(Filter.java:124)
at oracle.apps.xdo.template.rtf.RTF2XSLParser.write(RTF2XSLParser.java:166)
at oracle.apps.xdo.template.rtf.io.Filter.readFromStream(Filter.java:64)
at oracle.apps.xdo.template.rtf.RTFParser.generate(RTFParser.java:134)
at oracle.apps.xdo.template.rtf.RTF2XSLParser.generateXSL(RTF2XSLParser.java:291)
at oracle.apps.xdo.template.RTFProcessor.process(RTFProcessor.java:247)
at Main.main(Main.java:28)
But opening "example.rtf" with MSWord and resaving it I will get no error.
Why?
I need to convert a huge amount of RTF files so I need to know the reason of this strange error.
Thank you!Hi,
The error could be in the path what you are providing (\\)
I have been using this API quite sometime for now, and have not faced any issue. Please find the code below. Try giving a single \ in the path. It should work fine
try
RTFProcessor processor = new RTFProcessor("c:\test.rtf");
processor.setOutput("c:\test.xsl");
processor.process();
catch (Exception e)
e.printStackTrace();
Regards,
Suresh -
Hi all,
I want certain clarifications n XML Publisher reporting tool
1.I have attached a java code to call the report and have hard coded the location of rtf file and the datatemplate.
But we dont want to hardcode the location.What are the possible ways to prevent hardcoding.
2.From XML Publisher Administration responsibility, I created a data definition and a template(RTF Template)
But we are not registering the report as a concurrent program.So how to use data definition and the templates directly in the java program.
3.What are the steps to be performed to make the report translatable.
Java Code:
package oracle.apps.dpp.report;
import com.sun.java.util.collections.Hashtable;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Collection;
import oracle.apps.xdo.XDOException;
import oracle.apps.xdo.dataengine.DataProcessor;
import oracle.apps.xdo.template.FOProcessor;
import oracle.apps.xdo.template.RTFProcessor;
public class DPPReportAPI {
public DPPReportAPI() {
public String getUIReportUI(String p_strReprtLayout, Hashtable p_htParam, String p_strReportType) {
//based on the layout, write the SQL and bind it with the parameters in the Hashtable
//to get the value in the hashtable, use htParam.get("param1");
//pass the formed SQL for execution to the XML Publisher API that returns XMLdata
//Use the XMLData and the layout to generate the report
OutputStream rtfXSLOS = new ByteArrayOutputStream();
InputStream xmlDataIS = null;
InputStream xmlTransIS = null;
try {
RTFProcessor processorRTF2XSL =
new RTFProcessor(p_strReprtLayout);
//Convert rtf to FO XSL
processorRTF2XSL.setOutput(rtfXSLOS);
processorRTF2XSL.process();
} catch (Exception e) {
System.out.println("catch " + e.getMessage());
System.out.println(" Exception in xxmlp.FormatNotification, Method-formatToXSL");
e.printStackTrace();
//Convert XSL to String
String xslString = ((ByteArrayOutputStream)rtfXSLOS).toString();
//Get xsl template as input stream
InputStream xslTemplateIS =
new ByteArrayInputStream(xslString.getBytes());
try {
Class.forName("oracle.jdbc.OracleDriver");
String url = "jdbc:oracle:thin:@ap601sdb:20063:cz121dv1";
java.sql.Connection jdbcConnection = DriverManager.getConnection(url,"apps", "apps");
DataProcessor dataProcessor = new DataProcessor();
dataProcessor.setDataTemplate("/home/sanagar/Java/testdatatemplate.xml");
Hashtable parameters = p_htParam;
//parameters.put("id", "catalog1");
dataProcessor.setParameters(parameters);
dataProcessor.setConnection(jdbcConnection);
dataProcessor.setConnection(jdbcConnection);
dataProcessor.setOutput("/home/sanagar/Java/testoutput.xml");
dataProcessor.processData();
} catch (SQLException e) {
System.out.println("SQLException " + e.getMessage());
} catch (ClassNotFoundException e) {
System.out.println("ClassNotFoundException " + e.getMessage());
} catch (XDOException e) {
System.out.println("XDOException" + e.getMessage());
FOProcessor processorXSL2RPT = new FOProcessor();
processorXSL2RPT.setData("/home/sanagar/Java/testOutput.xml");
processorXSL2RPT.setTemplate(xslTemplateIS);
//Set Output
OutputStream osReport = new ByteArrayOutputStream();
processorXSL2RPT.setOutput(osReport);
//Set Output Format
if (p_strReportType == null || p_strReportType != null && p_strReportType.equals("FORMAT_PDF"))
processorXSL2RPT.setOutputFormat(FOProcessor.FORMAT_PDF);
else if (p_strReportType.equals("FORMAT_RTF"))
processorXSL2RPT.setOutputFormat(FOProcessor.FORMAT_RTF);
else if (p_strReportType.equals("FORMAT_HTML"))
processorXSL2RPT.setOutputFormat(FOProcessor.FORMAT_HTML);
else if (p_strReportType.equals("FORMAT_EXCEL"))
processorXSL2RPT.setOutputFormat(FOProcessor.FORMAT_EXCEL);
try {
processorXSL2RPT.generate();
} catch (XDOException e) {
e.printStackTrace();
System.exit(1);
return osReport.toString();
public static void main(String[] args) {
DPPReportAPI xmlPublisher = new DPPReportAPI();
Hashtable parameters = new Hashtable();
parameters.put("P_TRANSACTION_NUMBER", "1000");
String strOutput = xmlPublisher.getUIReportUI("/home/sanagar/Java/CUSTOMERCLAIM.rtf", parameters, "FORMAT_RTF");
System.out.println("Output String: "+strOutput);
Thanks,
Sangheetha.Hi Sangheetha,
I am new to Java, and working on the XMLP 5.6.3 with EBS 11.5.9.
Where to write this Java code for bursting or the Java API's documented in XML Publisher user guide. JDevloper tool is required to do this, if yes pls let me know which version should i go for and how can use for XMLP to develop reports, i mean how to integrate the JDeveloper with XML Publisher and EBS.
I really appriciate your early reply.
Thanks,
Madhu -
Hi,
We are using XML Publisher API to generate PDF,EXCEL outputs using Template. While adding image to the template its showing in the pdf output. But not showing in the Excel output. Then i added url:{/Image} in the alt text of the image in template and submitted the report again now able to see the image in excel output. Can you please tell me why its not showing the image in excel by default which is right happening in case of PDF. Iam getting the same issue for HTML outputs generation also. Please tell me what i can do to get the image by default same as the way i am getting in PDF.
Thanks
SatyaShouldn't this be posted to the BI Publisher support forum??
Thank you,
Tony Miller
Ruckersville, VA -
EXCEL output logo issues in XML Publisher
Hi,
We are using XML Publisher API to generate PDF,EXCEL outputs using Template. While adding image to the template its showing in the pdf output. But not showing in the Excel output. Then i added url:{/Image} in the alt text of the image in template and submitted the report again now able to see the image in excel output. Can you please tell me why its not showing the image in excel by default which is right happening in case of PDF. Iam getting the same issue for HTML outputs generation also. Please tell me what i can do to get the image by default same as the way i am getting in PDF.
Thanks
SatyaHi Alex,
Thanks for your suggession.
I have two OAF versions and i found the xml publisher version from the below java file
$OA_JAVA/oracle/apps/xdo/common/MetaInfo.class
in both 11.5.10 and 12.1.1 OAF versions i am seeing the below line of code
public static final String VERSION = "Oracle XML Publisher 5.6.3";
when i login to the application and went to the About this page option available there
in 11.5.10 i got to see that the version
is XML Oracle XDK Java 9.0.4.0.0 Production
in 12.1.1 version
XML Oracle XML Developers Kit 10.1.3.130 - Production
But as per your seggession from the MOS document 736897.1, i came to know that it is an issue in 5.6.3
Can you please tell me how to find out my xml publisher version in different EBS versions.
I am using Office 2007.
Finally,
in the document i can see that
Applies to:
*BI Publisher (formerly XML Publisher) - Version 11.5 to 12.1 [Release 11.5 to 12.1]*
Information in this document applies to any platform.
Means this issue is not fixed even in 12.1.3.
To resolve this issue,do we need to do the manual image setup like the way menioned in the document 736897.1?
Thanks
Satya -
How to use 2 vo's in xml publisher pdf genarate report from oaf--urgent
Hi Guru's,
i am integrating xml publisher report from oaf. I found one good artical published by prabaker in apps2fusion site and i implemented the same. But it is used onley one view object to generate pdf. But in my case i want to use 4 view objects to generate report as pdf. So, kindly suggest me how to resolve this issue.
below i mentioned the site name whihc i follwed to implement my requirement.
http://apps2fusion.com/at/51-ps/260-integrating-xml-publisher-and-oa-framework.
pls help me as i am not getting , how to solve this issue.
Thanks in advance.
KeerthanaHi,
When we develop simple XML report also we used to get single data source either generated either from RDF or PL/SQL, in OAF XML data is coming from VO and XML Publisher API’s will process that data.
This approach works fine if you are having one VO, but if you are having two VOs then it is not possible (As per my understanding and comparing this scenario with simple XML publisher report).
I also faced same problem few months back, on my form I was having two VOs one for header and other for Lines and I have generate Report to show the data for both Headers and Lines. In my case I created a separate VO that was containing both Header and Line details and I was passing header Id to query that. I used query this VO only when someone clicks on “Print” button and it worked fine for me.
Regards,
Mahesh B. -
Defining page size in XML Publisher
Can we define page size using XML Publisher APIs.
We have a problem where a single RTF template will be used for different countries and depending upon the country, the report needs to be printed on Letter or A4 or anything.
I could find a parameter for Orientation but none for page size.
Is there something we can do for defining page size or we need to rely on the printer setup.
Regards,
Satrajitto which column do u wnat to calculate goto that column
<?add-page-total:variable_name;Column_name?>
ex: <?add-page-total:inv;INVOICE_AMOUNT?>
finally goto footer write
<?show-page-total:inv;"999G990D00"?> -
XML Publisher V/S Report builder
Hi,
Could someone please tell me what are the features that are available in the XML Publisher but not in oracle report
or vice-versa, Please provide some link or document for this.
Thanks,
PragatiHi,
When we develop simple XML report also we used to get single data source either generated either from RDF or PL/SQL, in OAF XML data is coming from VO and XML Publisher API’s will process that data.
This approach works fine if you are having one VO, but if you are having two VOs then it is not possible (As per my understanding and comparing this scenario with simple XML publisher report).
I also faced same problem few months back, on my form I was having two VOs one for header and other for Lines and I have generate Report to show the data for both Headers and Lines. In my case I created a separate VO that was containing both Header and Line details and I was passing header Id to query that. I used query this VO only when someone clicks on “Print” button and it worked fine for me.
Regards,
Mahesh B. -
Hi, I am looking for documentation for the Java APIs. I have the XML Publisher User Guide but would like some reference documentation for the APIs, javadoc or otherwise.
Is there also any documentation aimed specifically at interacting with XML Publisher from an external application using the core APIs?The javadoc is included with the XML Publisher enterprise 5.6.2 in the doc folder.
Hope that helps,
Klaus -
Oracle XML Publisher Java API's showing arabic characters as question marks
Hi All,
I have created a custom xml publisher report. All the setups in xdo.cfg and the fonts have been installed. When i run the report as concurrent program using the XDODTEXE as the executable this report executes fine displaying the arabic characters in the PDF output.
I have integrated this xml report to a OAF page where am getting the output of the arabic characters as ???????
Following is the java code i have used to generate the blob for the xml publisher report.
pageContext.writeDiagnostics(this,"Inside process Template",4);
AppsContext appsContext = ((OADBTransactionImpl)pageContext.getRootApplicationModule().getOADBTransaction()).getAppsContext();
String applicationShortName = dataDefApplication;
String dataSourceCode = dataDefCode;
OutputStream os = new ByteArrayOutputStream();
try {
DataTemplate dataTemplate = new DataTemplate(transaction.getAppsContext(), dataDefApplication, dataDefCode);
//Get Parameters
ArrayList parameters = dataTemplate.getParameters();
//set Parameter Values as ArrayList of oracle.apps.xdo.dataengine.Parameter
Iterator it = parameters.iterator();
while (it.hasNext())
Parameter p = (Parameter) it.next();
pageContext.writeDiagnostics(this,"Processing Parameters "+p.getName(),4);
if (p.getName().equals("P_AUCTION_HEADER_ID"))
if(AuctionHeaderId != null)
p.setValue(AuctionHeaderId);
else
p.setValue(null);
dataTemplate.setOutput(os);
dataTemplate.processData();
System.out.println(os.toString());
} catch (SQLException e) {
System.out.println("SQLException occurred.");
} catch (XDOException e) {
System.out.println("XDOException occurred.");
} catch(Exception e){
System.out.println("Exception (other) occurred.");
byte[] xmlb = os.toString().getBytes();
BlobDomain blob = new BlobDomain(xmlb);
return blob;
Kindly let me if i had missed something.
Thanks
AnoopOn a related note, I am seeing a couple of different types of 'incorrect' characters based on different NLS_LANG settings.
If it is set to AMERICAN_AMERICA.UTF8, I get characters like this:
رقم الموظ�
If it is set to ARABIC_UNITED ARAB EMIRATES.AR8MSWIN1256, I get characters like this:
ÑÞã ÇáãæÙÝ
Do any of you know what these characters are?
Thanks for any insight. -
XML Publisher Report Output from OAF Page
Hi,
I created a button in a OAF page, and called the XML publisher Report program on click of this button. The concurrent request was ran when check from View Requests. When I click on viewout, the pdf document was open with the option, open, save, cancel. But this is not coming up in the OAF page. when debugged the code, the url is null.
Please see the below code.
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)paramOAPageContext.getRootApplicationModule().getOADBTransaction();
String s1 = oadbtransactionimpl.getAppsContext().getEnvStore().getEnv("TWO_TASK");
System.out.println("s1 = " + s1);
String s2 = oadbtransactionimpl.getAppsContext().getEnvStore().getEnv("GWYUID");
System.out.println("s2 = " + s2);
String s3 = "BEGIN :1 := fnd_webfile.get_url(fnd_webfile.request_out, :2, :3, :4, 2); end;";
CallableStatement callablestatement = paramOAPageContext.getApplicationModule(paramOAWebBean).getOADBTransaction().createCallableStatement(s3, 1);
System.out.println("s3 = " + s3);
if(requestId != 0)
try
Number number = new Number(requestId);
callablestatement.registerOutParameter(1, 12);
callablestatement.setInt(2, number.intValue());
callablestatement.setString(3, s2);
callablestatement.setString(4, s1);
callablestatement.execute();
String s4 = callablestatement.getString(1);
System.out.println("Before S4 if statement");
if(s4 == null || s4.equals(""))
// throw new RuntimeException();
System.out.println("URL is null");
System.out.println(" print ouput url - " + s4 );
// throw OAException.wrapperException(exception);
oadbtransactionimpl.putValue("OutputURL", s4);
System.out.println(" print ouput url - " + s4 );
}Look at the links AJ gave.
Basically what you will do is create a Data Definition and assign a Data Template to it. Create a (document) Template and assign it to your data definition. You will use the XML Publisher Java API classes to pass parameters to your data template and extract the XML data. Then you will use this in conjunction with your document template and the OAF integration region to present the final output to the user.
All of these things are in the XML Publisher documentation and Javadocs.
Maybe you are looking for
-
Hey guys, my name is Armando I bought this laptop back in April -->http://www.walmart.com/ip/HP-Anodized-Silver-17.3-Pavilion-17-e119wm-Laptop-PC-with-AMD-A10-5750M-Qu... cause my old HP laptop had too many problems. Anyway I was wondering if thi
-
Question regarding connections between apple tv and receivers
All of my components run through a Yamaha receiver and then from the receiver directly to a Sharp Aquos tv. Does the apple tv also need to run through the receiver, or can it be connected using an HDMI directly into the tv. And if so, how do I get
-
Hi All, We are getting a run time error with the text "No more storage space available for extending an internal table." tcode executedd is we02. kindly let me know if anyone has come acrossed this kind of error. pointers will be appreciated
-
Retrieving URL for local html file in jar
I can't seem to load an html file from my jar file. I did public URL howtouse=this.getClass().getClassLoader().getResource("howtouse.html");and then added a hyperlinklistener to a editorpane that contained: "<a href='"+howtouse+"'>how to use</a>";whi
-
Create a lightbox of PDFs users can view and or download
I would like to create a directory of PDF's that end users could see a thumbnail image of the first page of the pdf and when they click on it it would expand to allow them to view the pages of the pdf, and or download them. I have 40+ years of old ne