以下两个版本都以场景调用为案例
1.旧版本Demo API,关键包odi-sdk-invocation.jar
OdiCommandScenario ODIcmdScenario = new OdiCommandScenario();
ODIcmdScenario.setScenName("SNOWWOLF.ERP_SIEBEL_LOAD_DISTRIBUTOR_RS_DATA_CDC");
ODIcmdScenario.setScenVersion("001");
ODIcmdScenario.setContext("Global");
ODIcmdScenario.setLogLevel(5);
ODIcmdScenario.addVariable("SNOWWOLF.SIEBEL_IMPORT_STATUS", "未导入");//PROJECT NAME.VAR NAME
//set synchronous mode
ODIcmdScenario.setSyncMode(OdiScenario.SYNC_MODE_SYNCHRONOUS);
//set connection details
OdiRepositoryConnection ODIConnection = new OdiRepositoryConnection();
ODIConnection.setJdbcDriver("oracle.jdbc.driver.OracleDriver");
ODIConnection.setJdbcUrl("jdbc:oracle:thin:@xxx.xx.x.xxx:1521:orcl");
ODIConnection.setJdbcUser("SOAM");
ODIConnection.setJdbcPassword("TMP");
ODIConnection.setOdiUser("ADMIN");
ODIConnection.setOdiPassword("TMP");
ODIConnection.setWorkRepositoryCode("SOAWDEV");
try
{
OdiInvocation ODIInvocation = new OdiInvocation("xxx.xx.x.xxx", 20913);//port:must be scheduler agent port
OdiInvocationResult ODIresult = ODIInvocation.invokeCommand(ODIcmdScenario, ODIConnection);
int status ;
if (ODIresult.isOk())
{
status = 1;
// logger.debug("Session " + ODIresult.getSessionNumber());
}
else
{
status = 0;
// logger.debug("Error in connecting to repository " + ODIresult.getErrorMessage());
}
ODIInvocation.close();
}
catch (Exception e)
{
e.printStackTrace();
// logger.debug("Exception " + io);
}
2.新版本API 通过代理方式
在线API http://docs.oracle.com/cd/E23943_01/apirefs.1111/e17060/toc.htm
RemoteRuntimeAgentInvoker invoker = new RemoteRuntimeAgentInvoker(
"http://localhost:8001/oraclediagent", this.getOdiUsername(), SnpsStringTools.replaceNVL(this.getOdiPassword()).toCharArray());
ExecutionInfo executeinfo= invoker.invokeStartScenario("I_SWY_DM_WTJG_TTT", "001",
new StartupParams(), "", "GLOBAL", 5,
"From Web Call", true, "WORKREP");
分享到:
相关推荐
重要的ODI问题回答关于解答ODI所产生的问题
at oracle.odi.core.datasource.support.DefaultDataSourceManager.createAndConfigureDataSourceProvider(Unknown Source) at oracle.odi.core.datasource.support.DefaultDataSourceManager$1.create(Unknown ...
数据库索引技术的总结,希望对大家有所帮助
ODI API Organization of This Manual ............................................................................................................. 1 Using Substitution Methods............................
工作总结--ODI开发.docx
odi-sdk-invocation.jar
Oswestry功能障碍指数问卷表(OswestryDabilityIndex,ODI).pdf
ODI的安装配置等,以及使用ODI的简单示例,中文图示
工作总结--ODI开发.doc
工作计划总结_ODI开发.doc
oracel odi excel 的连接配置文档,解决odi的配置中问题。
SNPW的全称是Sunopsis Work Repository ,是Oracle Data Integrator (ODI)用来存储在Designer中创建的对象(模型、项目、包、接口以及包的各种组件)和在Operator中的会话的执行情况日志。理解SNPW中表的结构可以...
Oracl ODI 的培训文档, 比较实用。 可以作为初学者的学习材料。
工作汇报odi开发
ODI安装手册-Windows版本.doc
ETL工具ODI安装教程,非常详细,喜欢ODI的朋友可以下载使用。
odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册odi 升级手册
ODI学习笔记.mm
odi 11g 安装指南,win2003平台,11.1.5 版本
清理odi日志