OAF与XML Pulisher集成.doc

上传人:m**** 文档编号:550959678 上传时间:2023-06-09 格式:DOC 页数:9 大小:99.01KB
返回 下载 相关 举报
OAF与XML Pulisher集成.doc_第1页
第1页 / 共9页
OAF与XML Pulisher集成.doc_第2页
第2页 / 共9页
OAF与XML Pulisher集成.doc_第3页
第3页 / 共9页
OAF与XML Pulisher集成.doc_第4页
第4页 / 共9页
OAF与XML Pulisher集成.doc_第5页
第5页 / 共9页
点击查看更多>>
资源描述

《OAF与XML Pulisher集成.doc》由会员分享,可在线阅读,更多相关《OAF与XML Pulisher集成.doc(9页珍藏版)》请在金锄头文库上搜索。

1、 July 15, 2008AIMMD070 Programer TrainingeGrid ConsultingOAF与XML Publisher集成Author:梁贤院Creation Date:December 1, 2012Last Updated:December 11, 2012Document Ref: Version:V1.0Note: Title, Subject, Last Updated Date, Reference Number, and Version are marked by a Word Bookmark so that they can be easily

2、reproduced in the header and footer of documents. When you change any of these values, be careful not to accidentally delete the bookmark. You can make bookmarks visible by selecting Tools-OptionsView and checking the Bookmarks option in the Show region.Approvals:Note: To add additional approval lin

3、es, press Tab from the last cell in the table above.Copy Number_Note: You can delete any elements of this cover page that you do not need for your document. For example, Copy Number is only required if this is a controlled document and you need to track each copy that you distribute.Document Control

4、Change Record5DateAuthorVersionChange Reference1-Dec-12SandyLiang1.0No Previous DocumentReviewersNamePositionDistributionCopy No.NameLocation1234Note: The copy numbers referenced above should be written into the Copy Number space on the cover of each distributed copy. If the document is not controll

5、ed, you can delete this table, the Note To Holders, and the Copy Number label from the cover page.Note To Holders:If you receive an electronic copy of this document and print it out, please write your name on the equivalent of the cover page, for document control purposes.If you receive a hard copy

6、of this document, please write your name on the front cover, for document control purposes.ContentsDocument Controlii环境ivEBS 环境iv本地环境iv用VO与XML Publisher集成5用VO生成数据.AM里调用5用CO调用方法5用PL/SQL与XML Publisher集成7用PL/SQL方法实例7AM调用方法7CO调用方法7Open and Closed Issues for this Deliverable9Open Issues9Closed Issues9环境E

7、BS 环境Operating system platform:UNIXOracle RDBMS Version: 9.2.0.7.0Oracle Applications Version:11.5.10.2Oracle Forms Version:6.0.8.25.2本地环境Jdeveloper安装在 D:Jdeveloper用PL/SQL与XML Publisher集成 OAF多语言实现 File Ref: OAF多语言实现.doc (V1.0 )Company Confidential - For internal use only用VO与XML Publisher集成用VO生成数据.AM

8、里调用在application module调用方法:import oracle.jbo.XMLInterface;import oracle.xml.parser.v2.XMLNode;public XMLNode getReportXMLNode(String keyId) ChgDisPrintTmpVOImpl vo = getChgDisPrintTmpVO1(); vo.executeQuery(); XMLNode xmlNode = (XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS); return xmlNode;用

9、CO调用方法增加一个funciton public void PrintPDF(OAPageContext pageContext, OAWebBean webBean, XMLNode xmlNode, String keyId) HttpServletResponse response = (HttpServletResponse) pageContext.getRenderingContext().getServletResponse(); String changeOrderType = pageContext.getParameter(ChangeOrderType); / Set

10、the Output Report File Name and Content Type String contentDisposition = attachment;filename=Distribution + keyId + .pdf; response.setHeader(Content-Disposition, contentDisposition); response.setContentType(application/pdf); try ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); xmlNo

11、de.print(outputStream); /xmlNode.print(System.out); ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray(); OADBTransactionImpl oaTrans = (OADBTransactionImpl) pageContext.getApplicationModule(webBean).getOADBTransaction(); String templateName = XVK_CHANGEMEMO_TEMPLAT

12、E_ENG; TemplateHelper.processTemplate(oaTrans.getAppsContext(), XVK, templateName, zh, CN, inputStream, TemplateHelper.OUTPUT_TYPE_PDF, null, response.getOutputStream(); response.getOutputStream().flush(); response.getOutputStream().close(); catch (Exception e) response.setContentType(text/html); th

13、row new OAException(e.getMessage(), OAException.ERROR); pageContext.setDocumentRendered(false); 修改CO processFormRequest事件public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) String event = pageContext.getParameter(EVENT_PARAM);if(print.equals(event) String KeyId = pageContext

14、.getParameter(KeyId); parameters = new Serializable KeyId ; XMLNode xmlNode = (XMLNode) am.invokeMethod(getReportXMLNode , parameters); PrintDisPDF(pageContext, webBean, xmlNode, KeyId); 用PL/SQL与XML Publisher集成用PL/SQL方法实例PROCEDURE print_payment_request ( p_payment_request_id IN NUMBER ,x_out_xml OUT CLOB ) ISBEGINdbms_lob.createtemporary(x_out_xml, TRUE);l_temp_str := ?xml vers

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 生活休闲 > 社会民生

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号