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

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_ye

    Hi 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

  • Xml publisher report problem

    I have a xml publisher report which list job names. After submitting concurrent program, I am getting below error
    A semi colon character was expected. Error processing resource
    some of the Jobs have special character '&'. below is code
    CREATE OR REPLACE PACKAGE BODY XML_RPT AS
        FUNCTION XML_TAG (p_tag IN VARCHAR2, p_data IN VARCHAR2) RETURN VARCHAR2 IS
        l_ret_str VARCHAR2(5000);
        BEGIN
            l_ret_str := '<'||p_tag||'>'||p_data||'</'||p_tag||'>';
            RETURN l_ret_str;
        END XML_TAG;
         PROCEDURE JOBS(errbuf          OUT  VARCHAR2,
                         retcode         OUT  NUMBER) IS
        CURSOR inv_Cur  IS
            select name          
            from per_jobs pv;        
         xmldata            varchar2(1000);
         l_sqlstr           varchar2(1000);
         l_seqnum           varchar2(3);
         l_job_name      varchar2(100);
        BEGIN
          xmldata := '<?xml version="1.0" encoding="UTF-8"?>';     
          xmldata :=xmldata|| '<JOB>';
          xmldata := xmldata||' <LIST_JOB>';
          fnd_file.put_line(fnd_file.output,xmldata);    
          FOR rpt_rec IN inv_Cur LOOP
              xmldata := '<JOB_REC>';
              l_job_name := replace(rpt_rec.JOB_NAME,'&','&amp');         
              xmldata := xmldata || XXMCG_XML_TAG('JOB_NAME',L_JOB_NAME);
              xmldata :=xmldata|| '</JOB_REC>';
              fnd_file.put_line(fnd_file.output,xmldata);
          END LOOP;
          xmldata := '</LIST_JOB>';
          xmldata := xmldata||'</JOB>';
         fnd_file.put_line(fnd_file.output,xmldata);
        EXCEPTION
        WHEN OTHERS THEN
             fnd_file.put_line(fnd_file.log,substr(SQLERRM,1,500));
        END JOBS;
    END XML_RPT;

    I resolved the problem. I have to put ; in the special character.

  • XML Publisher Table problem

    Hi,
    I have been trying to build a table in a BI Report that does the following my attempts so far have not work. What I would like to happen is to have a table that has 15 rows displayed even if there are not 15 line items and in the event of more than 15 line items I would then like the extra lines to rollover to the next page displaying 15 rows in the table even if the remainder of line items is not 15. The report generates output for multiple customers. Please could someone advise how I could do this?
    Thank you,
    Mark

    A method for soving this problem is described here:
    http://oracle.anilpassi.com/xml-publisher-developing-reports-printed-on-pre-printed-stationary.html

  • XML Publisher Render Problem

    The problem started since the first time I tryed to render one of the examples
    in the XML Publisher...example: Executive - Sales Dashboard. Since the first time, when I try to view the result, the screen shows me this problem:
    Error
    The report cannot be rendered because of an error, please contact the administrator.
    If I try to do the same view but in XML format, I see these problem:
    Error de parseo XML: no se encontraron elementos
    Lugar: http://suse9.es.oracle.com:7780/xmlpserver/servlet/xdo?_xpf=&_xpt=0&_xdo=%2FExecutive%2FSales%20Dashboard%2FSales%20Dashboard.xdo&_xt=Advanced%20Sales%20Dashboard&_xf=xml
    Línea 3, Columna 1:
    The same hapends with the rest of the examples. I try to make a new template, but the same problem hapends.
    The conection JDBC with my Oracle DB 10.2.0.1 is OK.
    I put the "debug" mode in my configuration files, so I can view the java error stak. It shows me:
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeParse(XSLT10gR1.java:479)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:192)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:161)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1015)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:968)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:209)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1561)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:951)
         at oracle.apps.xdo.servlet.XDOProcessor.process(XDOProcessor.java:192)
         at oracle.apps.xdo.servlet.XDOProcessor.process(XDOProcessor.java:273)
         at oracle.apps.xdo.servlet.ReportImpl.renderBody(ReportImpl.java:227)
         at oracle.apps.xdo.servlet.ReportImpl.renderReportBody(ReportImpl.java:46)
         at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:319)
         at oracle.apps.xdo.servlet.XDOServlet.writeReport(XDOServlet.java:223)
         at oracle.apps.xdo.servlet.XDOServlet.doGet(XDOServlet.java:159)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:52)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:629)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: oracle.xdo.parser.v2.XMLParseException: Start of root element expected.
         at oracle.xdo.parser.v2.XMLError.flushErrors1(XMLError.java:324)
         at oracle.xdo.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:319)
         at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:281)
         at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:266)
         ... 35 more
    I log in with my admin/admin user.
    ¿Could anybody help me?

    I resolved the problem. I have to put ; in the special character.

  • XML Publisher API Document

    Hi,
    I am looking for complete XML Publisher Java API Docs. Any pointers would be helpful.
    Thanks in Advance
    ~Neeraj

    The 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 output problem

    i am getiing the output of .rtf file in .rtf only but i selected the pdf format. why it is happning

    I am using the template builder and after that .rtf file I am attaching in XML Publisher Administration resoponsibility of oracle application. but when i am running this custom program to get pdf output which i selected as pdf format in xml publisher administration I am not getting the pdf output and getting the same .rtf output of design template only like column n there field no data.

  • 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

  • XML Publisher Template Problem

    Hi
    This is very basic question as I am new to XML/BI Publisher
    I am using templates in iRecruitment for Offers. I am facing problems when I am formatting numbers and uploading the templates.
    Problem is when I see the offer letter from Application, it generates pdf with following format
    120u000n00 whereas number should be 120,000.00
    My number format is as follows
    $#,##0.00;
    I am using Word 2007 and saving the file as rtf document. Uploading the document to R12.0.4

    What is your locale?
    <?show-page-total:TotalFieldName;'Oracle-number-format'?>
    "BI Publisher supports two methods for specifying the number format:
    • Microsoft Word's Native number format mask
    • Oracle's format-number function
    Note: You can also use the native XSL format-number function to
    format numbers. See: Native XSL Number Formatting, page 5-126."
    "To use the Oracle format mask or the Microsoft format mask, the numbers in your data source must be in a raw format, with no formatting applied (for example: 1000.00). If the number has been formatted for European countries (for example: 1.000,00) the format will not work."
    Is more than one format model being applied? That will cause problems too.

  • Reg: Problem  in XML PUBLISHER Report

    Hi all,
    I am working building report using xml publisher. Problem i facing was ,
    *1. I created the template in RTF and attached to data definition*
    for eg: my rtf is
    sno item quantity price ( I created this field in table structure and mapped to xml data)
    Total Price ( this also i am getting from data definition)
    The below is sample constant sentence for my client and typed just below Total Price ( field i mentioned above)
    Inspected  By                                          Approved By     
    *1)*
    ________________________________     1)________________________________     Store Incharge : ______________________
    *2)*
    ________________________________       2)  ________________________________     Received           : _______________________
    *3)*
    ________________________________     3   ________________________________     Prepared  By    :             _______________________
    NOTE : ABOVE MENTIONED LINES ARE CONSTANT ONE.
    2. When i ran the report, if my data definition return 5 lines means , i am getting PDF output Correctly in single page (1st page)
    3) If my data definition returns lines more than 8 lines means, I am getting PDF output with Table structure values with item, in 1 st page and Constant sentence in 2nd page of PDF
    4) If my data definition returns lines between 5 and 8 means, I am getting PDf output with table structure values with item and some of Constant sentence of my client in 1 st page and few of the constanst sentence in 2nd page.
    Actually my need
    Even if the data definitions exceeds more than 5 lines the constant sentence should be placed either in the first page or in the next page based on the no. of lines in the data definition.
    How to resolve this... any approach most welcome. Wat changes i have to make.

    Krishna
    Modified your code a little bit.Use this
        public int submitCPRequest(String shipmentId) {
        System.out.println("into submitCPRequest");
            OAPageContext pageContext;
            OAWebBean webBean;
        try {
    OAApplicationModule am =pageContext.getApplicationModule(webBean);
        OADBTransaction tx = (OADBTransaction)am.getOADBTransaction();
        java.sql.Connection pConncection = tx.getJdbcConnection();
        ConcurrentRequest cr = new ConcurrentRequest(pConncection);
        String applnName = new String("XXAPL"); //Application that contains the concurrent program
        System.out.println("ApplName"+ applnName);
        String cpName = new String("XXAPLPOSMPRD"); //Concurrent program name
        System.out.println("Concc Name"+ cpName);
        String cpDesc = new String(" APL PO Shipping Material Pickup Request"); // concurrent Program description
        // Pass the Arguments using vector
        // Here i have added my parameter headerId to the vector and passed the
        //vector to the concurrent program
        Vector cpArgs = new Vector();
        cpArgs.addElement(shipmentId);
        System.out.println("Args"+ cpArgs);
        // Calling the Concurrent Program
        int requestId = cr.submitRequest(applnName, cpName,cpDesc, null, false, cpArgs);
        cr.addLayout("XXAPL", "XXAPLPOSMPRT", "ENG", "US" , "RTF");
        System.out.println("Req Id"+ requestId);
        tx.commit();
        return requestId;
            catch (RequestSubmissionException e) {
            System.out.println("Into Exception");
            OAException oe = new OAException(e.getMessage());
            oe.setApplicationModule(this);
            throw oe;
            catch(Exception exception)
            throw OAException.wrapperException(exception);
        }Thanks
    AJ

  • Xml publisher reprot - special character problem

    I invoice report through xml publisher. I have '&' special character in vendor list. I am getting below error
    A semi colon character was expected. Error processing resource.
    Below is the code
    CREATE OR REPLACE PACKAGE BODY XML_RPT AS
        FUNCTION XML_TAG (p_tag IN VARCHAR2, p_data IN VARCHAR2) RETURN VARCHAR2 IS
        l_ret_str VARCHAR2(5000);
        BEGIN
            l_ret_str := '<'||p_tag||'>'||p_data||'</'||p_tag||'>';
            RETURN l_ret_str;
        END XML_TAG;
         PROCEDURE VENDOR(errbuf          OUT  VARCHAR2,
                         retcode         OUT  NUMBER) IS
        CURSOR inv_Cur  IS
            select pv.vendor_name          
            from po_vendors pv;        
         xmldata            varchar2(1000);
         l_sqlstr           varchar2(1000);
         l_seqnum           varchar2(3);
         l_vendor_name      varchar2(100);
        BEGIN
          xmldata := '<?xml version="1.0" encoding="UTF-8"?>';     
          xmldata :=xmldata|| '<VENDOR>';
          xmldata := xmldata||' <LIST_VENDOR>';
          fnd_file.put_line(fnd_file.output,xmldata);    
          FOR rpt_rec IN inv_Cur LOOP
              xmldata := '<VENDOR_REC>';
              l_vendor_name := replace(rpt_rec.VENDOR_NAME,'&','&amp');         
              xmldata := xmldata || XXMCG_XML_TAG('VENDOR_NAME',L_VENDOR_NAME);
              xmldata :=xmldata|| '</VENDOR_REC>';
              fnd_file.put_line(fnd_file.output,xmldata);
          END LOOP;
          xmldata := '</LIST_VENDOR>';
          xmldata := xmldata||'</VENDOR>';
         fnd_file.put_line(fnd_file.output,xmldata);
        EXCEPTION
        WHEN OTHERS THEN
             fnd_file.put_line(fnd_file.log,substr(SQLERRM,1,500));
        END VENDOR;
    END XML_RPT;can any one advice.

    Duplicate post ? xml publisher report problem
    Srini

  • 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.
    Keerthana

    Hi,
    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,
    Satrajit

    to 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"?>

Maybe you are looking for

  • Multiple tree objects in ApEx 4.0

    Hi all, I'm working on a project where i need to put 2 tree objects in one region. First tree object is correct but when i add my second tree below the first one no data is shown or the wrong data is shown. Strange thing is when i put the second tree

  • File association problems with Win2K server

    Hi, I have a client - 5 Macs in a Win2K network. They're designers and store/work on all their jobs on a Win2K volume. About 2 months ago, problems started happening - files lost their application association (mostly all were turned into Unix exec fi

  • After install of itunes 7, does not recognize ipod

    I recently updated itunes to 7, after the update itunes does not recognize my ipod. I am using windows xp with a 5th generation 30G video ipod, have followed the troubleshooting guide relating to this to no avail. have also gone through the 5 r's, wi

  • "purchase failed" message shows up continually

    Hi .. When I open "Subway Surf" , A message that says " Purchase failed" shows up over and over and I can't start the game any Help ?!

  • Orientation lock on iPhone 5

    How do you unlock the vertical Orientation on the iPhone 5?