发布客户化PLSQL APIs到Oracle Integration Repositoy(IREP)

转:http://blog.csdn.net/cunxiyuan108/article/details/7752557

Oracle EBS二次开发中,PL/SQL程序是开发人员使用频率最高的开发语言,同时也是大家最容易掌握的工具之一了,而我们也很希望将自己编写的PL/SQL程序发布为Web服务来提供给客户端程序使用,同时也可以实现和外围系统的集成,有了irep_parser这个工具,我们就可以将自己编写的PL/SQL程序发布到Oracle Integration Repositoy中。Oracle Integration Repositoy中集成接口的来源都是Oracle,客户化的程序发布上去的为Custom:

integration_repository

下面描述如何将PL/SQL程序接口发布到Oracle Integration Repositoy中作为集成接口供第三方程序集成调用

 

一、添加客户化应用到Product Family

客户化应用设置好之后,它没有归属于任何的产品家族,如我的客户化应用XHU,因此发布在客户化应用下的集成接口在Oracle Integration Repositoy中无法方便的查看,如下图:

image

如果客户化集成接口是组织到自己的应用下就需要先注册一个产品家族,下面将Hand University(XHU) 应用注册到Oracle Seeker Suite(os_pf)这个产品家族下作为例子进行演示:

1,添加产品家族 Oracle Seeker Suite(os_pf)

执行如下的SQL代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
begin
  -- Call the procedure
  ad_pa_insert_package.insert_ad_pm_product_info(x_product_abbreviation => 'os_pf',
                                                 x_pseudo_product_flag => 'N',
                                                 x_product_family_flag => 'Y',
                                                 x_application_short_name => NULL,
                                                 x_product_name => 'Oracle Seeker Suite',
                                                 x_product_family_abbreviation => NULL,
                                                 x_product_family_name => NULL,
                                                 x_aru_update_date => SYSDATE,
                                                 x_currdate => SYSDATE,
                                                 x_last_updated_by => -1,
                                                 x_created_by => -1);
  COMMIT;
end;

 

2,注册Hand University(xhu)应用到产品家族中

执行如下的SQL代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
begin
  -- Call the procedure
  ad_pa_insert_package.insert_ad_pm_product_info(x_product_abbreviation => 'xhu',
                                                 x_pseudo_product_flag => 'N',
                                                 x_product_family_flag => 'N',
                                                 x_application_short_name => 'XHU',
                                                 x_product_name => 'Hand University',
                                                 x_product_family_abbreviation => NULL,
                                                 x_product_family_name => NULL,
                                                 x_aru_update_date => SYSDATE,
                                                 x_currdate => SYSDATE,
                                                 x_last_updated_by => -1,
                                                 x_created_by => -1);
  COMMIT;
end;

 

3,关联Hand University应用到产品家族Oracle Seeker Suite下

执行如下的SQL代码

1
2
3
4
5
6
7
8
9
10
begin
  -- Call the procedure
  ad_pa_insert_package.insert_ad_pm_prod_family_map(x_product_abbreviation => 'xhu',
                                                    x_product_family_abbreviation => 'os_pf',
                                                    x_aru_update_date => SYSDATE,
                                                    x_currdate => SYSDATE,
                                                    x_last_updated_by => -1,
                                                    x_created_by => -1);
  COMMIT;
end;

完成后如果应用下有集成接口可以看到如下的产品家族信息:

image 

 

二、按照集成接口标记规范编写PL/SQL程序

按照业务逻辑的要求编写PL/SQL程序,除了需要在PL/SQL程序的声明中按照集成接口标记的要求添加标记注释之外,其它和一般的程序没有任何区别,如下是一个用来实现新增一个员工的程序:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CREATE OR REPLACE PACKAGE oracleseeker_emp_pkg AS
/* $Header: $ */
/*#
* This package using maintain the employee information
* @rep:scope public
* @rep:product XHU
* @rep:lifecycle active
* @rep:displayname OracleSeeker Employee
* @rep:compatibility S
* @rep:category BUSINESS_ENTITY ORACLESEEKER
*/
 
/*#
* Create an Employee
* @param p_empno employee number
* @param p_ename employee name 
* @param p_job employee's job
* @param p_mgr employee's manager
* @param p_hiredate employee is hired date
* @param p_sal employee's salary
* @param p_comm employee's commision
* @param p_deptno employee's department
* @rep:scope public
* @rep:lifecycle active
* @rep:displayname Create an Employee
*/
  PROCEDURE create_employee( p_empno     VARCHAR2,
                             p_ename     VARCHAR2,
                             p_job       VARCHAR2,
                             p_mgr       NUMBER,
                             p_hiredate  DATE,
                             p_sal       NUMBER,
                             p_comm      NUMBER,
                             p_deptno    NUMBER );
END oracleseeker_emp_pkg ;

 

关键几个标记描述:

@rep:product XHU 代表集成接口注册到XHU应用中,必须是系统中存在的应用简称 
@rep:displayname OracleSeeker Employee 集成接口的名称 
@param 存储过程和方法的参数,都需要标注出来供调用服务的客户端查看 
@rep:category BUSINESS_ENTITY ORACLESEEKER 业务实体的类型,ORACLESEEKER必须在BUSINESS_ENTITY 值列表类型下定义存在,否则无法通过验证

business_entity_oracleseeker

更多关于集成接口标记内容可以查看Oracle EBS Integrated SOA Gateway的实施手册。

 

三、验证集成接口标记并生成iLDT文件

将编写好的PLSQL声明定义保存为.pls文件(oracleseeker_emp_pkg.pls),并将其上传到服务器应用(xhu)的patch/115/sql目录下,通过Telnet使用命令来验证和生成集成接口标记文件,成功验证后会有如下的日志生成,同时会生成iLDT文件oracleseeker_emp_pkg_pls.ildt ,如果标记存在问题会打印出对应的错误信息,需要注意查看错误消息并进行修正。

1
2
3
4
5
6
7
8
9
10
11
[appl02@ebs006 irep]$ $IAS_ORACLE_HOME/perl/bin/perl $FND_TOP/bin/irep_parser.pl -g -v -username=sysadmin xhu:patch/115/sql:oracleseeker_emp_pkg.pls:12.0=oracleseeker_emp_pkg.pls
# Interface Repository Annotation Processor, 12.0.0
 
# 
# Generating annotation output.
# Processing file 'oracleseeker_emp_pkg.pls'.
# Using YAPP-based parser.
#  Found a package-level annotation for 'ORACLESEEKER_EMP_PKG'.
#  Found a detail-level annotation...
# Found a procedure named 'CREATE_EMPLOYEE'.
# Done all files.

 

四、将iLDT文件上传到Oracle Integration Repositoy中

将上面生成的iLDT文件通过FNDLOAD命令工具上传到Oracle Integration Repositoy中,命令如下:

FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/wfirep.lct oracleseeker_emp_pkg_pls.ildt

成功上传之后通过Oracle Integration Repositoy可以查看如下的集成接口信息

plsql_intergration_interface_employee

下面是接口中的详细描述

plsql_create_emp_func

 

后面将讲解如何发布其它类型的程序到Oracle Integration Repositoy中,以及如何将发布后的集成接口转换为Web服务,并通过程序来调用它们。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
64位版本的 PLSQL 正式版,只能运行在64位系统中,需要你安装 64 位的 Oracle11g 或 Oracle12c 客户端。 安装中文包时请注意安装路径是否为PLSQL程序的路径。 备注:新版本Ribbon启用了 Ribbon 界面,改动较大,不习惯的建议不要更新。 部分插件会加载失败。 keygen生成注册码非100%有效~~请多尝试几次 New features Ribbon User Interface PL/SQL Developer now uses a new Ribbon User Interface instead of a Menu User Interface: The Quick Access Toolbar above the ribbon contains the most frequently used functions, so that they are always immediately available. You can customize the Quick Access Toolbar to your own liking. Users that prefer a menu-like system to preserve screen real estate can select to automatically hide the ribbon. In the preferences you can select an option to revert to the familiar toolbar layout from PL/SQL Developer 11.0 and earlier. Single Document Interface On the "View" ribbon you can now choose between a Single Document Interface (SDI) or Multiple Document Interface (MDI - the same as in PL/SQL Developer 11.0 and earlier). In SDI mode you always see just one maximized window. A tab control above the window allows you to quickly switch between the windows: General User Interface Enhancements PL/SQL Developer is now fully compliant with High-DPI screens such as 4K monitors and notebooks. All controls and images will scale with resolution (some Plug-Ins may still need to be enhanced). Click on the image below to enlarge this example of a 15" 4K notebook (250% DPI): All window types now have a specific icon color, so that you can quickly identify the type in the Window List, in the SDI tab control, in the window titles, and so on. The transaction status is now visible in the status bar of a window, next to the "Saved" and "Executing" indicators. Added user interface preference "Preselect current user for object selection lists". PL/SQL Clipboard The new PL/SQL Clipboard is a dockable tool that stores the history of all SQL and PL/SQL code you copy to the Windows clipboard, so that you can paste the clipboard item again in the future. It has a filter function so that you can quickly find a clipboard item based on its contents: At the bottom you see the PL/SQL Clipboard history items. Clicking on an item will show the text with syntax highlighting in the preview pane, and will show the timestamp above the preview pane. Double-click on an item to paste the text in the cursor location of the current editor or drag & drop it to a specific location in an editor. You can use the editor preferences to configure when and how items are added to and deleted from the PL/SQL Clipboard. Debugger Enhancements You can now display compound variable values such as user-defined types, records and cursors: Support has been added for Error Breakpoints, which allow you to break execution when a specific exception (handled or unhandled) occurs: Breakpoints can now be saved and loaded. Debug object privileges can now be granted and revoked from the user interface. Code Assistant Enhancements The Code Assistant can now include column names from a DML statement context without using an alias: The Code Assistant can now describe sub-records. The Code Assistant now includes an <All> choice for default object type constructors. The Code Assistant can now include synonyms for user object lists. The Code Assistant no longer pre-selects <All> after typing part of a parameter/column name. SQL Window Enhancements A new preference has been added: "Null value cell color for mandatory columns". This allows you to quickly identify mandatory columns when adding new records: The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu. This allows you to quickly build a where clause based on the selection: When viewing or editing LOB's the contents for common data formats will automatically be recognized, so that an external viewer or editor can be invoked: Changes made and saved in an external editor will automatically be propagated to the column data. The SQL Window will now navigate to the offending cell in the result set after an insert or update with a column-specific error. The rowid column is now omitted when exporting a result set grid in SQL format. Test Window Enhancements You can now define Standard Tests for a specific function or procedure: A Standard Test can be invoked from the popup menu when right-clicking on the function or procedure in the Object Browser or in a PL/SQL source: The Test Window now supports Oracle12c implicit results, which are automatically detected and added to the variable list: A new Oracle / Output preference has been added to save dbms_output to a file. The filename can include
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值