IREP: 生成服务后台工具soagenerate.sh

十月 23, 2009 in Oracle EBS二次开发

Oracle Integration Repositoy(IREP)中发布客户化集成接口为Web Service一文中介绍过如何通过Oracle Integration Repository界面来发布集成接口,这样的方式有如下的特点:

  1. 可视化的操作界面给我们带来了操作的简便性
  2. 成批处理或者发布处理时间比较长的时候带来不便
  3. 程序移植的过程反而变得费时费力,同时容易出现遗漏等问题

因此Oracle 提供了一个后台的处理脚本 $FND_TOP/bin/soagenerate.sh 来从后台来完成PL/SQL、并发程序和XML Gateway Map的接口类型生成WSDL服务。

 

一、soagenerate.sh使用语法

soagenerate [help] irepname=<irepname> logfile=<logfile> printprops=<true|fale>

参数:

help:打印出使用的说明
irepname(必须):集成接口的内部名称,即在Oracle Integration Repository中看到的 Internal Name
logfile(可选):生成WSDL服务时生成的日志信息,可以通过这个参数来指定到其它的位置和文件
printprops(可选):true/false,用来控制生成WSDL服务时使用到的系统属性是否要显示

 

二、soagenerate.sh使用实例

下面就通过这个工具来从后台为ORACLESEEKER_DEPT_PKG 集成接口生成WSDL服务,通过telnet登录EBS服务器后运行如下的命令:

[appl02@ebs006]$ soagenerate.sh irepname=ORACLESEEKER_DEPT_PKG logfile=irep.log printprops=true

成功执行后WSDL相关的文件会生成到目录 $INST_TOP/soa/<接口类型>/<接口分类ID>/ 中:

1
2
3
4
5
6
7
8
9
10
11
12
[appl02@ebs006 4690]$ ls -al
total 48
drwxr-xr-x  2 appl02 appl 4096 Oct 23 13:04 .
drwxr-xr-x  4 appl02 appl 4096 Oct 23 12:50 ..
-rw-r--r--  1 appl02 appl 2769 Oct 23 13:04 ADD_DEPARTMENT.wsdl
-rw-r--r--  1 appl02 appl 1245 Oct 23 12:50 AppsContextHeader.wsdl
-rw-r--r--  1 appl02 appl  771 Oct 23 12:50 APPS_ORACLESEEKER_DEPT_PKG_ADD_DEPARTMENT.xsd
-rw-r--r--  1 appl02 appl 1033 Oct 23 12:50 APPS_ORACLESEEKER_DEPT_PKG_UPDATE_DEPARTMENT.xsd
-rw-r--r--  1 appl02 appl 4234 Oct 23 12:50 ORACLESEEKER_DEPT_PKG_soap_http.wsdl
-rw-r--r--  1 appl02 appl 4521 Oct 23 12:50 ORACLESEEKER_DEPT_PKG_soap.wsdl
-rw-r--r--  1 appl02 appl  886 Oct 23 12:50 ORACLESEEKER_DEPT_PKG.wsdl
-rw-r--r--  1 appl02 appl 2927 Oct 23 12:50 UPDATE_DEPARTMENT.wsdl

同时生成日志文件irep.log,生成具体文件路径信息可以从日志中看到:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
######################## 
 
ServiceGenerator invoked at : Fri Oct 23 12:50:40 CST 2009 
 
Using following properties :- 
 
INST_TOP = /d02/inst/apps/VIS02_ebs006
OAFM oc4j.properties = /d02/inst/apps/VIS02_ebs006/ora/10.1.3/j2ee/oafm/config/oc4j.properties
JTFDBCFILE = /d02/inst/apps/VIS02_ebs006/appl/fnd/12.0.0/secure/VIS02.dbc
SOA_SERVER_TEMP_DIRECTORY_LOCATION = /d02/inst/apps/VIS02_ebs006/soa/
SOA_SERVER_URL = http://ebs006.hand-china.com:8001
SOA_ENABLE_STANDALONE_LOGGING = true
SOA_CREATE_DB_CONN_CONTEXT = true 
 
Fetching classId for irepName = ORACLESEEKER_DEPT_PKG
Class Id for irep_name ORACLESEEKER_DEPT_PKG = 4690
Generating service with classId = 4690
WSDL Location  = /d02/inst/apps/VIS02_ebs006/soa//PLSQL/4690/ORACLESEEKER_DEPT_PKG_soap.wsdl 
 
Service Generated.
ServiceGenerator ends at : Fri Oct 23 12:50:44 CST 2009

如果printprops参数设置为false,那日志中的前面一段中的属性就不会打印出来

 

三、soagenerate.sh工具的应用

一看soagenerate.sh工具并没有给我们带来什么,可是细心一想就知道错了。如果在项目中开发人员开发了多个客户化的接口类型,使用如XDF或FNDLOAD这样的工具可以将相关的程序设置进行不同环境的移植,可是如果没有这个工具我们就需要逐个到Oracle Integration Repository界面中去手工生成WSDL服务,而有了这个工具就无需这么麻烦了。

因此集成接口开发的步骤变成:

  1. 按照集成接口标记的规范编写程序
  2. 发布程序到Oracle EBS环境
  3. 按照要求编写整理集成接口的标记文件
  4. 使用irep_parser.pl工具验证标记并生成iLDT文件
  5. 使用FNDLOAD工具将接口信息从iLDT文件上传到Oracle Integration Repository中
  6. 通过soagenerate.sh工具生成WSDL服务

通过上面介绍的步骤,从开发环境、测试环境、UAT环境到最后的正式环境,集成接口的开发移植都变得更加轻松了。

 

如果Web服务的授权和Deploy也可以通过批处理那就更加完美了,不知道Oracle是否会完善这部分工作了。

相关文章:

  1. 重新编译EBS R12的JSP页面
  2. 使用Integration Repositoy Parser(IREP)的前提设置
  3. 发布客户化PLSQL APIs到Oracle Integration Repositoy(IREP)
  4. Oracle Integration Repositoy(IREP)中发布客户化集成接口为Web Service
  5. IREP: 测试Integration Repository客户化Web服务的调用
  6. IREP: 发布并发程序(Concurrent Program)为Web服务

Leave a reply

You must be logged in to post a comment.