15
Integrating ODI with Jboss for Data Services Learn how to deploy in Jboss for Oracle Data Integrator for data services. By Sree Ram Chennakrishnan Web Services is the method of communication between two applications in the World Wide Web. ODI as an ETL (Extract, Transform, Load) tool the web services can be achieved in many ways like Data services, Run time services and Third party web services. Data Services are nothing but doing DML operations over the web. It means exposing the data store to the external world. This can be achieved using the any application server. In this article, I have chosen Jboss as the application server for ODI Data services deployment and usage. We will do the following steps in the order to achieve this. Demo below uses the Oracle database, Jboss Application Server, SOAP UI to obtain the data services. I assume that you have already set up an Oracle Data Integrator master and work repository. For details see “Oracle Data Integrator : Getting Started with an ETL Project” Pre-requisites: ODI 11.1.1.7 EAP Jboss 6 Use JDK version from 1.6.0_29 and above but less than 1.7 installed (Please note JDK and not JRE) SOAP UI Oracle 11G R2 Express edition Windows 7/XP/VISTA (Admin access preferable) RAM 2 GB HDD 5 GB approximately Steps to be followed Check environment is ready ODI o Setting up topology o Import SKM o Configuring Data store (Oracle database)

Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Embed Size (px)

Citation preview

Page 1: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Integrating ODI with Jboss for Data Services

Learn how to deploy in Jboss for Oracle Data Integrator for data services.

By Sree Ram Chennakrishnan

Web Services is the method of communication between two applications in the World Wide

Web. ODI as an ETL (Extract, Transform, Load) tool the web services can be achieved in many

ways like Data services, Run time services and Third party web services. Data Services are

nothing but doing DML operations over the web. It means exposing the data store to the

external world. This can be achieved using the any application server. In this article, I have

chosen Jboss as the application server for ODI Data services deployment and usage. We will do

the following steps in the order to achieve this.

Demo below uses the Oracle database, Jboss Application Server, SOAP UI to obtain the data

services.

I assume that you have already set up an Oracle Data Integrator master and work repository.

For details see “Oracle Data Integrator : Getting Started with an ETL Project”

Pre-requisites: ODI 11.1.1.7

EAP Jboss 6

Use JDK version from 1.6.0_29 and above but less than 1.7 installed (Please note JDK

and not JRE)

SOAP UI

Oracle 11G R2 Express edition

Windows 7/XP/VISTA (Admin access preferable)

RAM 2 GB

HDD 5 GB approximately

Steps to be followed Check environment is ready

ODI

o Setting up topology

o Import SKM

o Configuring Data store (Oracle database)

Page 2: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

o Generate Deployable

Jboss

o Start Jboss

o Install jdbc driver

o Configure data source

o How to deploy

SOAP UI

o Create New Project

o DML Operations

ODI

Setting up topology Login to the work repository in the Oracle Data Integrator and navigate to the topology section. In the

topology create new physical, logical connections. Map the physical and logical through the context.

Physical and logical connections have to be created for JAX-WS and ORACLE technology.

Go to the oracle technology and enter the following parameters shown below in the definition and JDBC

tab,

Page 3: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Enter the values as per your requirements for the oracle technology. Data server name can be any name

and connection must contain the schema name as created in oracle database.

Now navigate to the JAX-WS technology and enter the following parameters assuming Jboss runs in port

8080 in the local machine. Data server name and Physical schema name can be any name. Physical

schema can be created by right clicking the data server already created.

Page 4: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

,

Logical Architecture for Oracle and JAX-WS are created as follows,

Page 5: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Logical schema has to be mapped to the physical schema name. Similarly create the logical architecture

for the JAX-WS technology,

Start the agent and test the connection.

Go the ODI_HOME\agent_standalone\oracledi-agent-standalone\oracledi\agent\bin in the command

prompt and give the below command to start the ODI agent

agent -NAME=<physical_agent_name>

Test the agent connection. You have to get agent test connection successful.

Page 6: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Import SKM Create a new project in the ODI Designer and import the SKM – Oracle knowledge module. Give project

name. I have given ODI_Dataservices as project name.

Once project is created go to the SKM in knowledge modules section in the project and right click to

import the KMs

Knowledge modules are in the folder location below

ODI_HOME\ xml-reference\oracledi-xml-reference\oracledi\xml-reference

Page 7: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Check the SKM Oracle and click OK button.

An import report tab will appear. Close that by click close button.

Configure Data store (oracle data base)

Create a data store for the oracle database in the designer. Go to the models section and create a new

model. Once model is created import the table for the particular model.

Page 8: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Sample table creation: CREATE TABLE <SCHEMA.TABLE> (ID NUMBER, NAME VARCHAR2(25))

In the models, go to the definitions tab and enter the parameters. Choose schema created for oracle

technology.

Go to the reverse engineer tab and click standard radio button, give context and format for table in the

mask section.

Selective reverse engineer the table you need,

Once table is reverse engineered, the data store will appear.

Go to the Services tab and give the following parameters for application server as logical schema,

namespace, package name, data source name, data service name and service KM as SKM Oracle from

the project ODI_Dataservices.

Page 9: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Click on the Deployed data stores tab in the services section in Model. Click the check box for the data

stores need to be deployed. Here, I am using TEST_02 as a data store with only one column ID in it.

Double click and open the data store. Create a primary key for any column. I am creating a primary key

for ID column.

Create a primary key for Column ID

Page 10: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Generate Deployable Deployable has to generate in the local machine as war file. The war is deployed in the Jboss. Go to the

model and to services tab and click on the Generate and Deploy button at the bottom.

A pop window appears. Enter the parameters, choose context and click all check boxes in the generation

phase. Once successful status is shown, navigate to the <LOCAL_FOLDER_NAME> mentioned below and

you will find the <MODEL_NAME>.war file. This is your deployable.

JBOSS

Start Jboss Jboss AS is started by navigating to the JBOSS_HOME\ bin\ and double click the standalone.bat

Once the Jboss is started create a user to the admin console to do the operations.

Page 11: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Create Admin console user

Navigate to the Jboss folder location JBOSS_HOME/bin/ add-user.bat

Double click add-user.bat

o Choose option a

o Click enter

o Type a user name

o Type a password (8 chars mixed of caps and small letter, numbers, special characters)

o Retype password

o Enter

o Click yes

o Click yes

o Click enter

o Close the window. You have successfully create a user

Login to Admin console

Open web browser IE

Type: http://localhost:8080

Page 12: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Click admin console

It will ask for username and password

Once given all items, you will be able to log in

Install JDBC Driver

Navigate to the Jboss folder location JBOSS_HOME/modules/

Create a folder ‘com/jdbc/main’

Copy paste module.xml and ojdbc6.jar in folder JBOSS_HOME/modules/com/jdbc/main

Navigate to the Jboss folder location JBOSS_HOME/bin

Double click jboss-cli.bat

Once executed you will able to a console and give command ‘connect’

Copy paste the command

‘/subsystem=datasources/jdbc-driver=jdbc:add(driver-name=jdbc,driver-module-name=com.jdbc,driver-

xa-datasource-class-name=oracle.jdbc.OracleDriver)‘

Give enter

Now you will be able to see a success in the screen

Jdbc driver is installed

Configure datasource

Navigate to the Admin console in jboss

Click profile tab at the right corner

In subsystem view expand connector

Click Data sources

Click add button

Data source parameters

Page 13: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Name : Give any name

JNDI Name : java:/oracle

Click next

Select driver as ‘oracle’

Click next

Connection URL : jdbc:oracle:thin:@localhost:1521:xe (Enter according to your project)

Username: <dba username>

Password: <dba password>

Click done

Now enable the datasource

Then in selection section below , navigate to tab connection and click test connection

You will get a prompt of successful connection

Now data source is all set

How to Deploy

Navigate to the jboss folder location JBOSS_HOME/standalone/deployments/

Copy paste the war file generated by ODI code

Open the windows IE

Paste the below command

http://localhost:8080/<WAR_FILE_NAME>/<WSDL_NAME>?wsdl

Wsdl name is where you can go to the code generated generateDataServices/WEB-INF/wsdl/ folder

And you can able to see a wsdl. It is the wsdl name

Page 14: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

SOAP UI

Create a new project

Copy paste the url with meaning full entry. A sample is given below how the URL has to be,

http://localhost:8080/<WAR_FILE_NAME>/<WSDL_NAME>?wsdl

Click OK and a new project is created. Once the project is created, go to the any of the methods in the

table. You can go to add type of service and insert a data. Similarly for update, delete and select

Page 15: Integrating ODI with Jboss for Data Services - … · Integrating ODI with Jboss for Data Services ... the following steps in ... I assume that you have already set up an Oracle Data

Click execute for the ID entered as 2 for my example above. In the right tab you will find results. Go to

the oracle table and check. You will be able to see the row which you have inserted.

Through Data services in ODI you will be able to do DML operations to an oracle table

Known Errors

You might get an error while due to oracle 11g and Jboss run on the same port. Got to the oracle login

and change the port

You must login to DBA user and execute the below command

exec DBMS_XDB.SETHTTPPORT(8081)