Kavin's SOA Blog

August 31, 2009

Complete Installation and configuration of Oracle Data Integrator (ODI), ODI Web Services with JDeveloper, BPEL

 

Installing Oracle Data Integrator, Oracle Data Profiling, Oracle Data Quality

  • Click on setup.exe . Click Next

image

  • Check “Oracle Data Integrator, Oracle Data Profiling, Oracle Data Quality 10.1.3.5.0” and click next

image

  • Check “Complete” and Click next

image

  • Specify ODI Home name and location. Click Next

image

  • Specify port, click Next

image

  • Specify host name and ports, I left them at default ones.

image

  • Again left at default one

image

  • Check summary and click Install

image

Configuring Repository

  • After install is finished execute the script to create master and work repository user. You can use the one I did

– tablespace for master repository
create tablespace ts_odim
  logging
  datafile ‘C:\oracle\ora10g\database\oradata\orcl\ts_odim.dbf’
  size 32m
  autoextend on;

– tablespace for work repository
create tablespace ts_odiw
  logging
  datafile ‘C:\oracle\ora10g\database\oradata\orcl\ts_odiw.dbf’
  size 32m
  autoextend on;

create temporary tablespace tmp_odi
  tempfile ‘C:\oracle\ora10g\database\oradata\orcl\tmp_odi.dbf’
  size 32m
  autoextend on ;

– USER SQL
CREATE USER snpm IDENTIFIED BY snpm123
DEFAULT TABLESPACE TS_ODIM
TEMPORARY TABLESPACE TMP_ODI;

GRANT CONNECT, RESOURCE TO snpm;

CREATE USER snpw IDENTIFIED BY snpw123
DEFAULT TABLESPACE TS_ODIW
TEMPORARY TABLESPACE TMP_ODI;

GRANT CONNECT, RESOURCE TO snpw;

  • Launch bin/repcreate.bat or bin/repcreate.sh to create Master Repository. Complete fields and click OK

image 

  • When prompted, click OK

image

  • To connect to the Master repository launch the Topology Manager script (bin/topology.bat or bin/topology.sh)
  • Click on the button New

image

  • Click on Test to check the connection is working. Validate by OK, then OK. Topology Manager opens.

image

 

image

  • The default password of the SUPERVISOR is SUNOPSIS.

image

  • In the icon list Topology -> Repositories -> Work repositories, click with the right button,
    then choose Insert work repository.

image

  • In the connection window, complete the parameters and click OK

image

  • Click JDBC tab

image

image

image

image

  • New Work Repository can be seen in topology manager now

image

  • To connect to a work repository and launch the Designer module

image

  • Click on the button New

image

  • Complete the fields, test connection and click ok

image

  • Now connect to work rep using SUPERVISOR/SUNOPSIS

image

  • New Designer window will open up for current repository

image

Deploying ODI Web Applications – Lightweight Designer

  • Open Enterprise Manager console
  • Click oc4j_odi > Applications > Deploy
  • Browse to location <ODI_DOWNLOAD_DIR>\setup\Manual and select oracledilwd.war file (Lightweight Designer)

 
image

  • Click Next

image

  • Accept default values, click Next

image

  • Click Deploy

image

  • Check deployment report for any errors and click Return.

image

  • Test Application at http://oc4j_host:oc4j_port/oracledilwd/

image 

Configuring Repository Connections

  • Lightweight Designer connects the repositories though JDBC datasource. Update data-sources.xml to have connection pool and datasources configured as below.

<managed-data-source user="snpm" password="snpm123" connection-pool-name="ODI_CONNECTION_POOL" jndi-name="jdbc/ORACLE_MASTER" name="ODI_MASTER_DS"/>
<managed-data-source user="snpw" password="snpw123" connection-pool-name="ODI_CONNECTION_POOL" jndi-name="jdbc/ORACLE_WORK" name="ODI_WORK_DS"/>
<connection-pool name="ODI_CONNECTION_POOL">
   <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" url="jdbc:oracle:thin:@//localhost:1521/orcl"/>
</connection-pool>

  • Add the entries to link the datasource in the application context. Edit web.xml located under <OC4J_ODI>\applications\oracledilwd\oracledilwd\WEB-INF\web.xml

<resource-ref>
    <description>Oracle Datasource for the Master Repository</description>
    <res-ref-name>jdbc/ORACLE_MASTER</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>
<resource-ref>
    <description>Oracle Datasource for the Work Repository</description>
    <res-ref-name>jdbc/ORACLE_WORK</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Unshareable</res-sharing-scope>
</resource-ref>

  • Define the Lightweight Designer login information to the work repositories. Edit repositories.xml located under <OC4J_ODI\applications\oracledilwd\oracledilwd\

<login name="My Work Repository">
    <master name="jdbc/ORACLE_MASTER" masterDriver="oracle.jdbc.OracleDriver"/>
    <work name="jdbc/ORACLE_WORK" workName="WORKREP"/>
</login>

Deploying ODI Web Applications – Metadata Navigator

  • Click oc4j_odi > Applications > Deploy

 image

  • Browse to location <ODI_DOWNLOAD_DIR>\setup\Manual and select oracledimn.war file (Metadata Navigator). Click Next

image

  • Accept defaults, click Next

image

  • Click Deploy

image

  • Check deployment report for any errors and click Return.

image

  • Test Application at http://oc4j_host:oc4j_port/oracledimn/

image

Configuring Repository Connections

To configure the connections to your repositories in the web application, we need to follow two steps.

  • Configure the connection to the work repository in Designer.
  • Copy the snps_login_work.xml file from <ODI_HOME>\oracledi\bin directory into <OC4J_ODI>\applications\oracledimn\oracledimn\WEB-INF/WEB_INF

Configuring Apache Axis 2 (ver 1.2)

image

  • Provide WAR file location and click next

image

  • Provide WAR file location and click next

image

  • Provide WAR file location and click next

image

  • Provide WAR file location and click next

image

  • Provide WAR file location and click next

image 

image

image

  • Deploy odi-public-ws.aar located under <ODI_DOWNLOAD_DIR>\oracledi\tools\web_services using the "Upload Service" link or drop into webapps/axis2/web-inf/services directory

image

  • Deployment confirmation page showing success (or in cases will show errors)

image

  • Copy odiInvoke.wsil from <ODI_DOWNLOAD_DIR>\oracledi\tools\web_services to <OC4J_ODI>\applications\axis2\axis2\axis2-web\OdiInvoke.wsil

Change Location attribute from

location="./services/OdiInvoke?wsdl">

to

location="/axis2/services/OdiInvoke?wsdl">

image

Configuring JDeveloper

  • To show local WSIL registry uncomment External Source for WSIL lcoated under <JDEV_HOME>\integration\bpm\designer\config\serviceexplorer_plugin.xml

image

  • Create inspection.wsil  manually to the same directory where serviceexplorer_plugin.xml is located. <JDEV_HOME>\integration\bpm\designer\config\inspection.wsil

<?xml version="1.0"?>
<inspection xmlns="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
            xmlns:wsilwsdl="http://schemas.xmlsoap.org/ws/2001/10/inspection/wsdl/">
    <link referencedNamespace="http://schemas.xmlsoap.org/ws/2001/10/inspection/"
                location=:/axis2/axis2-web/OdiInvoke.wsil">:/axis2/axis2-web/OdiInvoke.wsil">:/axis2/axis2-web/OdiInvoke.wsil">:/axis2/axis2-web/OdiInvoke.wsil">:/axis2/axis2-web/OdiInvoke.wsil">http://<host>:<port>/axis2/axis2-web/OdiInvoke.wsil>
            <abstract>Oracle Data Integrator Public Web Service</abstract>
    </link>
</inspection>

image

  • Restart JDeveloper and you should be able to see service in “Service Explorer”. You can now use it with BPEL, AIA, OSB or any other service aware application.

image

May 21, 2009

Book Review: Processing XML documents with Oracle JDeveloper 11g

Filed under: Review — Tags: , , , — Kavin @ 10:06 pm

Recently I have been approached by Packt Publishing to review their recently released book “Processing XML documents with Oracle JDeveloper 11g” by Deepak Vohra. They were kind enough to send me an e-book, which suits more to a person like me who lives out of suitcase.

Coming back to the point, as the book rightly mentioned, its objective is “to discuss XML development in Oracle JDeveloper” especially around JDeveloper 11g. JDeveloper has matured into a very robust IDE especially in J2EE and SOA arena. It’s XML handling capabilities are worthy enough to be mentioned separately. In a way Gaurav did a very smart job of focusing on one topic rather than try to cover wider topics in shallow waters.

First six chapters covers the basic of XML document, DOM, SAX, XSD, XSLT, XPath, JSTL XML taglibs. It was little bit an over-stretch for me, but I wouldn’t discount it completely as it can be really helpful for somebody who is really starting from scratch (truly no exemption). Most of the examples covered in these chapters can be easily mapped to other parsers without much difficulties. Chapter seven, eight and nine are amongst the ones which interested me most. I like theory portion of DOM 3.0 LS.

Chapter 10, 11, 12, 13 and 14 covers interesting and useful applied XML technologies like XMLDiff, XML2PDF, XML2XLS, Berkeley and XML Publisher. Chapters cover enough to give you a start but to deal with real life scenarios you might have to dig deeper. All in all these chapters might excite those who really like to try something new and different.

Overall it’s an easy read book which explains XML fundamentals in easy to understand language. I would definitely like this book as a beginner but it doesn’t have a lot to offer at intermediate level. I would have like to see some literature around SDOM, AJAX, StAX. All in all this is a good beginners book covering XML and related technologies.

April 29, 2009

Using functions in Routing Rules in ESB

Filed under: Development — Tags: , , , — Kavin @ 8:10 pm

Many of the times we get puzzled why the expression looks good but it won’t work in ESB expression. Also some of the functions are not available with expression builder at all. But the fact is that all these functions are available with ESB runtime engine and we should be able to use them in expressions. So for the functions which are visible through expression builder, we don’t need step 1 but for functions like dvm-lookup etc. which are not visible via expression builder we have to build that expressions.

So suppose we want to use dvm-lookup to do routing then we would need to perform following steps:

  • Create XPath Syntax

image

  • Copy expression from “Source” view

image

  • Paste expression in expression builder

image

  • Append the namespace using text editor. You can get namespace from same XSL file from where you copied XPATH expression.

image

image

Once you deploy you should be able to use lookup-dvm (or any other function) within routing rule.

In summary, XPath functions work within ESB routing rule, how you build that expression is totally upto you. As long as you put that xpath function with right namespace you should see results.

NOTE: Using DVM Lookup will affect portability of your code from OESB to OSB (a.ka. ALSB).

April 15, 2009

configuring Oracle Enterprise Registry (Harvester) with JDeveloper

  1. Copy the Harvester plug-in OER103-SOA-BPM-Harvester.zip located at <BEA_HOME>/repository103/core/tools/solutions under <JDEV_HOME>.
  2. Unzip the zip file with option “extract here”.

    image

  3. Check if a new folder “introspector” is created under <JDEV_HOME> folder. If not verify how you unzipped.
  4. Open the tools.xml file in <JDEV_HOME>\introspector in a text editor. Copy all the elements between the <tools> and </tools> elements and paste in tools.xml file in <JDEV_HOME>\jdev\system\oracle.jdeveloper.10.1.xxxxx and save it.
  5. Launch Oracle JDeveloper and click Tools > External Tools. You should be able to see two harvester menu items image
  6. To edit a Harvester item, select it and click Edit. In the Edit External Tool dialog box, edit the repository.url, repository.username, and repository.password properties to set the Oracle Enterprise Repository URL, username, and password. image
  7. To submit an item in the External Tools dialog box to Oracle Enterprise Repository, select it and click OK. Remember to import OER103-SOA-BPM-Suite-Solution-Pack in Oracle Enterprise Repository before exporting assets to OER

image

March 12, 2009

Creating copy of JDeveloper BPEL Project

Filed under: Development — Tags: , , , , — Kavin @ 5:35 pm

Out of the box, JDeveloper provides couple of templates (Synch and Asynch) for developing BPEL process. However, in real world scenarios, especially within matured SOA environments, you will need to have basic standards like fault handling, notification features built in. In such a case you have a option to use “custom template” option of JDeveloper where you build a BPEL project based upon standards and then mark this project as template. Once you do so JDeveloper will give you that project as an option while selecting template for BPEL project. However this option is little bit flaky. Many times I experienced that new project doesn’t have all the artifacts. So I came up with a small ANT task which serves the purpose. You simply paste this snippet inside your build.xml which JDeveloper creates for your out of box.

<target name="copyProject">
        <property name="sourceDir" value="${basedir}"/>
        <property name="sourceProject" value="${BPELSuitcase.BPELProcess(id)}"/>
        <echo> Step 1: Set target directory and project name</echo>
            <input message="Please enter target directory:" addproperty="targetDir"/>
            <input message="Please enter project names:" addproperty="projectName"/>
            <property name="sourceWSDLNamespace" value="http://otn.oracle.com/samplenawsdlmespace"/>
            <property name="sourceSchemaNamespace" value="http://otn.oracle.com/sampleschemanamespace"/>

            <input message="Please enter target WSDL namespace:" addproperty="targetWSDLNamespace"/>
            <input message="Please enter target Schema namespace:" addproperty="targetSchemaNamespace"/>

        <property name="projectDir" value="${targetDir}/${projectName}"/>

        <echo> Step 2: Copy files from template to New Project </echo>
            <copy todir="${projectDir}" verbose="true" includeemptydirs="false"
                overwrite="false">
                <fileset dir="${sourceDir}">
                    <exclude name="**/output/**"/>
                    <exclude name="**/*.bak"/>
                </fileset>
            </copy>

        <echo> Step 3: Renaming Files </echo>
            <move file="${projectDir}/${sourceProject}.jpr"
                tofile="${projectDir}/${projectName}.jpr" verbose="true"/>
            <move file="${projectDir}/bpel/${sourceProject}.wsdl"
                tofile="${projectDir}/bpel/${projectName}.wsdl" verbose="true"/>
            <move file="${projectDir}/bpel/${sourceProject}.bpel"
                tofile="${projectDir}/bpel/${projectName}.bpel" verbose="true"/>
            <move file="${projectDir}/bpel/${sourceProject}.xsd"
                tofile="${projectDir}/bpel/${projectName}.xsd" verbose="true"/>
            <replace dir="${projectDir}" token="${sourceProject}" value="${projectName}"
                   summary="true"/>

        <echo> Step 4: Replacing Namespaces </echo>
            <replace dir="${projectDir}" token="${sourceWSDLNamespace}" value="${targetWSDLNamespace}"
                   summary="true"/>
            <replace dir="${projectDir}" token="${sourceSchemaNamespace}" value="${targetSchemaNamespace}"
                   summary="true"/>
     </target>

It simply accepts 4 parameters

  1. Target Directory – It’s the directory where your project will be places e.g. c:\projects
  2. Project Name – Name of your BPEL project, also a folder will be created under your target directory folder you mentioned above e.g. c:\projects\sampleProject1
  3. Target WSDL Namespace – This will be target namespace of WSDL in new project.
  4. Target Schema Namespace – This will be target namespace of schema in new project.

Apart from that you have two more variables which you need to set i.e.

  1. Source WSDL Namespace – WSDL target namespace of your source project.
  2. Source Schema Namespace – Schema target namespace of your source project.

Once you complete this, you can simply run that target and you are good to go.

image

Older Posts »

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.