IGS_学习笔记05_IREP开发Concurrent Program为客户化集合接口(案例)
20150819 Created By BaoXinjian
一、摘要
Oracle E-Business Suite中使用频率非常高的客户化并发程序如何发布为Oracle Integration Repository中的WSDL服务。并发程序接口发布的流程是:
Step1. 根据集成接口标记的规范定义或编写并发程序的标记
Step2. 使用FNDLOAD将并发程序的标记信息导出到LDT文件中
Step3. 使用irep_parser.pl工具验证并生成接口描述标记文件(iLDT)
Step4. 使用FNDLOAD工具将接口描述标记文件中的信息上传到Oracle Integration Repository中
Step5. 通过Oracle Integration Repository可视化界面或者soagenerate.sh脚本将接口发布为WSDL服务
Step6. 将WSDL服务发布到中间服务器
二、定义并发程序的标记信息
由于一个并发程序实际上就是对应一个唯一的后台方法,因此它只有类级别的标记信息,定义标记的步骤如下:
1. 定义并发程序,这个步骤没有任何特殊的要求
2. 查找需要定义标记的并发程序,打开系统管理(System Administration)职责中的并发程序页面查找到它,点击更新并发请求图标进入更新界面
3. 点击Update Annotation按钮进入标记定义页面,按照标记规范添加标记
三、生成接口描述标记文件(iLDT)
1. 生成并发程序的定义文件(LDT)
使用FNDLOAD工具生成并发程序的LDT文件,文件中会将并发程序的定义,包括标记信息一并导出。通过Telnet登录服务器后,使用如下命令:
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct xxfnd_javaxmlcp.ldt PROGRAM CONCURRENT_PROGRAM_NAME=XXFND_JAVAXMLCP
(1). xxfnd_javaxmlc.ldt是生成的LDT文件名称,按照自己的要求命名
(2). XXFND_JAVAXMLCP是并发程序的简称(short_name)
[applvis@paleonode1 soa]$ FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct xxfnd_javaxmlcp.ldt PROGRAM CONCURRENT_PROGRAM_NAME=XXFND_JAVAXMLCP
Log filename : L5814433.log
Report filename : O5814433.out
[applvis@paleonode1 soa]$ ls -ltr
total 28
-rw-r--r-- 1 applvis oinstall 21706 Aug 19 09:09 xxfnd_javaxmlcp.ldt
-rw-r--r-- 1 applvis oinstall 880 Aug 19 09:09 L5814433.log
2. 生成的LDT文件中会包括如下的标记信息
BEGIN ANNOTATION "XXFND_JAVAXMLCP" "SQLAP"
OWNER = "OPERATIONS"
LAST_UPDATE_DATE = "2015/08/19"
PROGRAM_ANNOTATION =
"/*\n\
* Update the employee used concurrent program integration interface\n\
*@rep:scope public\n\
*@rep:product sqlap\n\
*@rep:lifecycle active\n\
*@rep:category BUSINESS_ENTITY BXJ_BUSINESS_ENTITY\n\
*/"
END ANNOTATION
3.验证并生成接口描述标记文件(iLDT)
将上面生成的并程序定义文件(.ldt)上传到应用的/patch/115/sql目录下,使用如下的命令验证和生成标记描述文件
$IAS_ORACLE_HOME/perl/bin/perl $FND_TOP/bin/irep_parser.pl -g -v -username=sysadmin sqlap:patch/115/sql:xxfnd_javaxmlcp.ldt:12.0=xxfnd_javaxmlcp.ldt
[applvis@paleonode1 sql]$ $IAS_ORACLE_HOME/perl/bin/perl $FND_TOP/bin/irep_parser.pl -g -v -username=sysadmin sqlap:patch/115/sql:xxfnd_javaxmlcp.ldt:12.0=xxfnd_javaxmlcp.ldt
# Interface Repository Annotation Processor, 12.0.0
# Generating annotation output.
# Processing file 'xxfnd_javaxmlcp.ldt'.
# Using hard-coded parser.
# Looking at program 'XXFND_JAVAXMLCP', 'SQLAP'
# Done all files.
三、上传接口定义到Oracle Integration Repository中,并发布
1. 使用FNDLOAD上传接口定义:
FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/wfirep.lct xxfnd_javaxmlcp_ldt.ildt
[applvis@paleonode1 sql]$ FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/wfirep.lct xxfnd_javaxmlcp_ldt.ildt
Log filename : L5814436.log
Report filename : O5814436.out
2. 使用soagenerate.sh发布接口为WSDL服务:
$FND_TOP/bin/soagenerate.sh irepname=XXFND_JAVAXMLCP logfile=irep.log printprops=true
四、测试并发程序生成的Web服务
1. 查看所发布的并发程序接口
2. 查看接口的详细信息
3. 发布为WSDL
4. 查看WSDL明细内容
<?xml version="1.0" encoding="UTF-8"?> <definitions name="XXFND_JAVAXMLCP" targetNamespace="http://xmlns.oracle.com/apps/sqlap/soaprovider/concurrentprogram/xxfnd_javaxmlcp/"
xmlns:tns="http://xmlns.oracle.com/apps/sqlap/soaprovider/concurrentprogram/xxfnd_javaxmlcp/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns1="http://xmlns.oracle.com/apps/sqlap/soaprovider/concurrentprogram/xxfnd_javaxmlcp/"> <types> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/apps/sqlap/soaprovider/concurrentprogram/xxfnd_javaxmlcp/"> <include schemaLocation="http://paleonode1.sh.paleotek.com:8002/webservices/SOAProvider/concurrentprogram/xxfnd_javaxmlcp/APPS_ISG_CP_REQUEST_CP_SUBMIT.xsd"/> </schema> <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/apps/sqlap/soaprovider/concurrentprogram/xxfnd_javaxmlcp/"> <element name="SOAHeader"> <complexType> <sequence> <element name="Responsibility" minOccurs="0" type="string"/> <element name="RespApplication" minOccurs="0" type="string"/> <element name="SecurityGroup" minOccurs="0" type="string"/> <element name="NLSLanguage" minOccurs="0" type="string"/> <element name="Org_Id" minOccurs="0" type="string"/> </sequence> </complexType> </element> </schema> </types> <message name="XXFND_JAVAXMLCP_Input_Msg"> <part name="header" element="tns:SOAHeader"/> <part name="body" element="tns1:InputParameters"/> </message> <message name="XXFND_JAVAXMLCP_Output_Msg"> <part name="body" element="tns1:OutputParameters"/> </message> <portType name="XXFND_JAVAXMLCP_PortType"> <operation name="XXFND_JAVAXMLCP"> <input message="tns:XXFND_JAVAXMLCP_Input_Msg"/> <output message="tns:XXFND_JAVAXMLCP_Output_Msg"/> </operation> </portType> <binding name="XXFND_JAVAXMLCP_Binding" type="tns:XXFND_JAVAXMLCP_PortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="XXFND_JAVAXMLCP"> <soap:operation soapAction="http://paleonode1.sh.paleotek.com:8002/webservices/SOAProvider/concurrentprogram/xxfnd_javaxmlcp/"/> <input> <soap:header message="tns:XXFND_JAVAXMLCP_Input_Msg" part="header" use="literal"/> <soap:body parts="body" use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="XXFND_JAVAXMLCP_Service"> <port name="XXFND_JAVAXMLCP_Port" binding="tns:XXFND_JAVAXMLCP_Binding"> <soap:address location="http://paleonode1.sh.paleotek.com:8002/webservices/SOAProvider/concurrentprogram/xxfnd_javaxmlcp/"/> </port> </service> </definitions>
5. 测试运行
Thanks and Regards
参考:张礼军先生 - http://oracleseeker.com/2009/10/27/publish_concurrent_program_to_integration_repository_as_web_service/
技术交流,技术讨论,欢迎加入
Technology Blog Created By Oracle ERP - 鲍新建