SlideShare a Scribd company logo
1 of 8
Download to read offline
Oracle SOA Suite 11g - Sample
SAMPLE NAME: adapters-db-103-File2StoredProcedure
COMPONENT: DB Adapter for Stored Procedures
OVERVIEW
This sample illustrates the use of the File Adapter interfacing with a stored procedure
invocation. The File Adapter reads a file from an input directory. The contents of that file
provide the value for the input parameter of the stored procedure. The value is a
collection of customers or, more specifically, a nested table of a customer object type.
The stored procedure iterates through the collection and inserts the data for each
customer into a ‘customers’ table.
PROVIDED FILES
Provided are the following files
• The SQL script needed to create the database schema objects.
• The generated XSD for the stored procedure.
• The payload for the file adapter to provide input to the stored procedure.
STEP BY STEP INSTRUCTIONS
RUNNING THE PREBUILT SAMPLE
Creating the Schema Objects and the Stored Procedure
The schema objects and the stored procedure are created using SQL*Plus. The DDL
statements for creating the data types and tables are
CREATE TYPE address AS OBJECT
(
street VARCHAR2(20),
city VARCHAR2(15),
state CHAR(2),
zip CHAR(5)
);
CREATE TYPE customer AS OBJECT
(
fname VARCHAR2(10),
Oracle SOA Suite 11g - Sample
lname VARCHAR2(10),
loc address,
email VARCHAR2(25),
phone VARCHAR2(15)
);
CREATE TYPE collection AS TABLE OF customer;
CREATE TABLE customers
(
name VARCHAR2(25),
loc VARCHAR2(45),
email VARCHAR2(25),
phone VARCHAR2(15)
);
The stored procedure is created using this statement
CREATE PROCEDURE add_customers(c IN collection) AS
BEGIN
FOR i IN c.FIRST .. c.LAST LOOP
INSERT INTO customers VALUES (
c(i).lname || ', ' || c(i).fname,
c(i).loc.street || ', ' || c(i).loc.city || ', ' || c(i).loc.state || ' ' || c(i).loc.zip,
c(i).email,
c(i).phone
);
END LOOP;
END;
Connect to the database as SCOTT/TIGER and execute the contents of customers.sql
using SQL*Plus.
RUNNING THE SAMPLE
Deploying the BPEL Process
1. Create a new connection instance in the weblogic-ra.xml file.
<connection-instance>
<jndi-name>eis/DB/oracle</jndi-name>
<connection-properties>
<properties>
<property>
<name>xADataSourceName</name>
<value>jdbc/OracleDataSource</value>
</property>
<property>
<name>dataSourceName</name>
<value></value>
</property>
</properties>
</connection-properties>
</connection-instance>
2. Create a new data source for the JNDI name specified via the <jndi-name>
element of the connection instance (i.e. eis/DB/oracle).
a. Connect to the WebLogic Server Administration Console.
b. Click the “Data Sources” link under the JDBC list item in the Services
section.
Oracle SOA Suite 11g - Sample
c. Enter “OracleDataSource” as the name and use the xADataSourceName as
the JNDI Name.
d. Select the Oracle Database Type and Oracle’s Driver (Thin XA) for
instance connections; Versions 9.0.1,9.20,10,11.
e. Enter the Connection Properties and click “Test Configuration”.
f. Deploy the data source to the “AdminServer” target.
3. In JDeveloper, right-click the project name and choose “Deploy” then “Deploy to
Application Server”. Accept the default deployment configuration. Check the
“Overwrite any existing composites with the same revision ID” checkbox if an
archive with the same revision ID has already been deployed.
4. Select an existing Application Server or create a connection to a new one. Choose
to deploy the archive to the soa_server1.
5. To verify that the application has been deployed successfully, click the
“Deployment” tab at the bottom of JDeveloper. This will show you the
deployment log.
6. Login to Enterprise Manager. The “File2SP [1.0]” archive will be listed in the
Deployments area.
Figure 1: Successfully Deployed Archive
TESTING THE BPEL PROCESS
Copy customers.xml to the directory for incoming files of the File Adapter service to
initiate the BPEL process.
VERIFYING EXECUTION
Login as SCOTT/TIGER using SQL*Plus and query the customers table.
SQL> select * from customers;
NAME LOC
------------------------- ---------------------------------------
------
EMAIL PHONE
------------------------- ---------------
Doe, John 123 Main Street, Anytown, CA 12345
john.smith@gmail.com 567-123-9876
Doe, Jane 987 Sunset Blvd, Sometown, CA 34567
JaneDoe@yahoo.com 567-123-9876
Click on the “File2SP [1.0]” link in Enterprise Manager. Click the “Instances” tab.
Click the Instance ID associated with the most recent execution. Look at the Trace.
Oracle SOA Suite 11g - Sample
Figure 2: Trace Results from the Test Instance
Click the BPELProcess link to look at the instance data. Expand the <payload> of the
Invoke activity to see the input from the file passed to the stored procedure.
Figure 3: Input Parameter Value for the Stored Procedure
BUILDING THE SAMPLE
CONFIGURING THE OUTBOUND ADAPTER SERVICE
Oracle SOA Suite 11g - Sample
1. Launch JDeveloper.
2. Create a new SOA Application called “File2SPApp”. Create a project called
“File2SP” with SOA Project Technologies selected. Select “Composite with
BPEL”.
3. Create a BPEL process called “BPELProcess” and select “Define Service Later”
from the list of Templates.
4. From the BPEL Services area drag and drop a Database Adapter service to the
right swim lane. Provide “AddCustomers” as the Service Name.
5. Choose an existing service connection or create a new one. The connection must
be to SCOTT/TIGER where the schema objects were created.
Figure 4: Establishing a Service Connection
6. Select “Call a Stored Procedure or Function” then browse for and select the
ADD_CUSTOMERS stored procedure.
Figure 5: Choosing a Stored Procedure
7. Click through the remaining pages of the wizard until you reach the Finish page.
Click “Finish” to end the wizard.
Oracle SOA Suite 11g - Sample
CONFIGURING THE INBOUND ADAPTER SERVICE
1. From the BPEL Services area drag and drop a File Adapter service to the left
swim lane. Provide “ReadFile” as the Service Name and select “Define from
operation and schema (specified later).”
2. Select “Read File” as the Operation Type. Specify a physical directory path for
incoming files. Specify a name pattern for incoming files to read and provide a
polling frequency.
3. On the Messages page click the search icon to look up a URL. Select
“InputParameters” from the SCOTT_ADD_CUSTOMERS.xsd project schema
file. Click “Finish on the Finish page.
CONFIGURING AN END TO END BPEL PROCESS
1. Under BPEL Activities drag a Receive activity and drop it where it says “Drop
Activity Here” in the process diagram.
2. Right-click the Receive activity and choose Edit. Name the activity “Receive” and
select ReadFile as the partner link. Auto-create the variable. Check the box
marked “Create Instance.”
Figure 6: Configuring the Receive Activity
3. Drag an Invoke activity and drop it after the Receive activity. Right click on the
Invoke and choose “Edit”. Name the activity “Invoke”. Use the Flashlight to find
and choose the “AddCustomers” Partner Link. Auto-create the Input variable.
Oracle SOA Suite 11g - Sample
Figure 7: Configuring the Invoke Activity
4. Provide a value for the stored procedure’s input variable by dragging an Assign
activity into the diagram, positioning it between the Receive and Invoke activities.
Right click the assign and choose “Edit”. Choose “Copy Operation” from the
dropdown (the green “+”) in the “Copy Operation” tab to copy the value read
from the file to the input parameter of the stored procedure.
Figure 8: Coping the Input Read from the File to the Input Parameter
Use the “General” tab to provide a name for the Assign (e.g. “Input”).
5. This completes the modeling of the BPEL Process. The diagramming between
the receiveInput and replyOutput activities should look similar to the following
Oracle SOA Suite 11g - Sample
Figure 9: The Complete BPEL Process
6. Click the “composite.xml” tab and choose the “Design” view. The composite
should resemble
Figure 10: Complete Composite Structure Diagram

More Related Content

What's hot

2\9.SSIS 2008R2 _Training - Control Flow
2\9.SSIS 2008R2 _Training - Control Flow2\9.SSIS 2008R2 _Training - Control Flow
2\9.SSIS 2008R2 _Training - Control FlowPramod Singla
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationRandy Connolly
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!BIWUG
 
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow TransformationsPramod Singla
 
Detail view in distributed technologies
Detail view in distributed technologiesDetail view in distributed technologies
Detail view in distributed technologiesjamessakila
 
Database programming in vb net
Database programming in vb netDatabase programming in vb net
Database programming in vb netZishan yousaf
 
BI Publisher Data model design document
BI Publisher Data model design documentBI Publisher Data model design document
BI Publisher Data model design documentadivasoft
 
Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverAmmara Arooj
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookMuralidharan Radhakrishnan
 
4\9 SSIS 2008R2_Training - Expression and Variables
4\9 SSIS 2008R2_Training - Expression and Variables4\9 SSIS 2008R2_Training - Expression and Variables
4\9 SSIS 2008R2_Training - Expression and VariablesPramod Singla
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Sparkhound Inc.
 
Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...
Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...
Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...Ravi Kumar Lanke
 

What's hot (20)

Database Connection
Database ConnectionDatabase Connection
Database Connection
 
2\9.SSIS 2008R2 _Training - Control Flow
2\9.SSIS 2008R2 _Training - Control Flow2\9.SSIS 2008R2 _Training - Control Flow
2\9.SSIS 2008R2 _Training - Control Flow
 
ASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And RepresentationASP.NET 08 - Data Binding And Representation
ASP.NET 08 - Data Binding And Representation
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!
 
Grid View Control CS
Grid View Control CSGrid View Control CS
Grid View Control CS
 
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations6.2\9 SSIS 2008R2_Training - DataFlow Transformations
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
 
Detail view in distributed technologies
Detail view in distributed technologiesDetail view in distributed technologies
Detail view in distributed technologies
 
For Beginers - ADO.Net
For Beginers - ADO.NetFor Beginers - ADO.Net
For Beginers - ADO.Net
 
Database programming in vb net
Database programming in vb netDatabase programming in vb net
Database programming in vb net
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
 
BI Publisher Data model design document
BI Publisher Data model design documentBI Publisher Data model design document
BI Publisher Data model design document
 
Web based database application design using vb.net and sql server
Web based database application design using vb.net and sql serverWeb based database application design using vb.net and sql server
Web based database application design using vb.net and sql server
 
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 BookADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
ADO Controls - Database Usage from Exploring MS Visual Basic 6.0 Book
 
4\9 SSIS 2008R2_Training - Expression and Variables
4\9 SSIS 2008R2_Training - Expression and Variables4\9 SSIS 2008R2_Training - Expression and Variables
4\9 SSIS 2008R2_Training - Expression and Variables
 
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
Optimizing Code Reusability for SharePoint using Linq to SharePoint & the MVP...
 
Ado.net
Ado.netAdo.net
Ado.net
 
Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...
Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...
Oracle endeca information discovery v3.0 integration with the obiee 11g bi se...
 
L12: REST Service
L12: REST ServiceL12: REST Service
L12: REST Service
 
GRID VIEW PPT
GRID VIEW PPTGRID VIEW PPT
GRID VIEW PPT
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
 

Viewers also liked

Jonathan_Bugg_Resume
Jonathan_Bugg_ResumeJonathan_Bugg_Resume
Jonathan_Bugg_ResumeJonathan Bugg
 
resume_concise_aug2016
resume_concise_aug2016resume_concise_aug2016
resume_concise_aug2016Tony Randolph
 
Rusk, Douglas - Resume at DesignLine Architects
Rusk, Douglas - Resume at DesignLine ArchitectsRusk, Douglas - Resume at DesignLine Architects
Rusk, Douglas - Resume at DesignLine Architectsdrusk
 
Harry Finance Resume
Harry Finance ResumeHarry Finance Resume
Harry Finance ResumeHarry Elaiho
 
Rania rabadi resume 2015
Rania rabadi resume 2015Rania rabadi resume 2015
Rania rabadi resume 2015Rania Rabadi
 
Michael Calderon Resume (2)
Michael Calderon Resume  (2)Michael Calderon Resume  (2)
Michael Calderon Resume (2)Mike Calderon
 

Viewers also liked (14)

Jonathan_Bugg_Resume
Jonathan_Bugg_ResumeJonathan_Bugg_Resume
Jonathan_Bugg_Resume
 
Resume (9-21-15)
Resume (9-21-15)Resume (9-21-15)
Resume (9-21-15)
 
turner_resume2016
turner_resume2016turner_resume2016
turner_resume2016
 
resume_concise_aug2016
resume_concise_aug2016resume_concise_aug2016
resume_concise_aug2016
 
Clegg Resume 2013
Clegg Resume 2013Clegg Resume 2013
Clegg Resume 2013
 
Rusk, Douglas - Resume at DesignLine Architects
Rusk, Douglas - Resume at DesignLine ArchitectsRusk, Douglas - Resume at DesignLine Architects
Rusk, Douglas - Resume at DesignLine Architects
 
Sai Konijeti Resume
Sai Konijeti ResumeSai Konijeti Resume
Sai Konijeti Resume
 
Harry Finance Resume
Harry Finance ResumeHarry Finance Resume
Harry Finance Resume
 
FrankMendoza_Resume
FrankMendoza_ResumeFrankMendoza_Resume
FrankMendoza_Resume
 
Mbusey.doc
Mbusey.docMbusey.doc
Mbusey.doc
 
Amanda's Resume
Amanda's ResumeAmanda's Resume
Amanda's Resume
 
Rania rabadi resume 2015
Rania rabadi resume 2015Rania rabadi resume 2015
Rania rabadi resume 2015
 
Michael Calderon Resume (2)
Michael Calderon Resume  (2)Michael Calderon Resume  (2)
Michael Calderon Resume (2)
 
DJLee2
DJLee2DJLee2
DJLee2
 

Similar to Adaptersdb-03-file2storedprocedure

Adapters db-104-informixstoredprocedure
Adapters db-104-informixstoredprocedureAdapters db-104-informixstoredprocedure
Adapters db-104-informixstoredprocedureprathap kumar
 
Toms introtospring mvc
Toms introtospring mvcToms introtospring mvc
Toms introtospring mvcGuo Albert
 
Oracle Endeca Developer's Guide
Oracle Endeca Developer's GuideOracle Endeca Developer's Guide
Oracle Endeca Developer's GuideKeyur Shah
 
WSDL-Design-and-Generation-in-EASparx
WSDL-Design-and-Generation-in-EASparxWSDL-Design-and-Generation-in-EASparx
WSDL-Design-and-Generation-in-EASparxFrank Ning
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studioAravindharamanan S
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studioAravindharamanan S
 
websphere cast iron labs
 websphere cast iron labs websphere cast iron labs
websphere cast iron labsAMIT KUMAR
 
Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3IMC Institute
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedIMC Institute
 
Adapters apps-102-change orderapi
Adapters apps-102-change orderapiAdapters apps-102-change orderapi
Adapters apps-102-change orderapiprathap kumar
 
Adapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogramAdapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogramprathap kumar
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Amit Singh
 
quickguide-einnovator-8-spring-cloud
quickguide-einnovator-8-spring-cloudquickguide-einnovator-8-spring-cloud
quickguide-einnovator-8-spring-cloudjorgesimao71
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Stamatis Zampetakis
 
07 asp.net session10
07 asp.net session1007 asp.net session10
07 asp.net session10Niit Care
 
Labs And Walkthroughs
Labs And WalkthroughsLabs And Walkthroughs
Labs And WalkthroughsBryan Tuttle
 

Similar to Adaptersdb-03-file2storedprocedure (20)

Adapters db-104-informixstoredprocedure
Adapters db-104-informixstoredprocedureAdapters db-104-informixstoredprocedure
Adapters db-104-informixstoredprocedure
 
dbadapters
dbadaptersdbadapters
dbadapters
 
Appcelerator - using node.ACS (part 1)
Appcelerator - using node.ACS (part 1)Appcelerator - using node.ACS (part 1)
Appcelerator - using node.ACS (part 1)
 
Toms introtospring mvc
Toms introtospring mvcToms introtospring mvc
Toms introtospring mvc
 
Oracle Endeca Developer's Guide
Oracle Endeca Developer's GuideOracle Endeca Developer's Guide
Oracle Endeca Developer's Guide
 
WSDL-Design-and-Generation-in-EASparx
WSDL-Design-and-Generation-in-EASparxWSDL-Design-and-Generation-in-EASparx
WSDL-Design-and-Generation-in-EASparx
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studio
 
Simple ado program by visual studio
Simple ado program by visual studioSimple ado program by visual studio
Simple ado program by visual studio
 
ASP.NET Lecture 4
ASP.NET Lecture 4ASP.NET Lecture 4
ASP.NET Lecture 4
 
websphere cast iron labs
 websphere cast iron labs websphere cast iron labs
websphere cast iron labs
 
Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3Java Web Programming Using Cloud Platform: Module 3
Java Web Programming Using Cloud Platform: Module 3
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet Advanced
 
Adapters apps-102-change orderapi
Adapters apps-102-change orderapiAdapters apps-102-change orderapi
Adapters apps-102-change orderapi
 
Adapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogramAdapters apps-101-orderimportconcurrentprogram
Adapters apps-101-orderimportconcurrentprogram
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
 
WebSphere Commerce v7 Data Load
WebSphere Commerce v7 Data LoadWebSphere Commerce v7 Data Load
WebSphere Commerce v7 Data Load
 
quickguide-einnovator-8-spring-cloud
quickguide-einnovator-8-spring-cloudquickguide-einnovator-8-spring-cloud
quickguide-einnovator-8-spring-cloud
 
Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21Apache Calcite Tutorial - BOSS 21
Apache Calcite Tutorial - BOSS 21
 
07 asp.net session10
07 asp.net session1007 asp.net session10
07 asp.net session10
 
Labs And Walkthroughs
Labs And WalkthroughsLabs And Walkthroughs
Labs And Walkthroughs
 

More from prathap kumar

More from prathap kumar (20)

E10132
E10132E10132
E10132
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
 
Xml material
Xml materialXml material
Xml material
 
Xslt
XsltXslt
Xslt
 
Xsd
XsdXsd
Xsd
 
Xml material
Xml materialXml material
Xml material
 
Xsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOAXsd Basics R&D with ORACLE SOA
Xsd Basics R&D with ORACLE SOA
 
E13882== ORACLE SOA COOK BOOK
E13882== ORACLE SOA COOK BOOKE13882== ORACLE SOA COOK BOOK
E13882== ORACLE SOA COOK BOOK
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
 
While R&D WITH ORACLE SOA
While R&D WITH ORACLE SOAWhile R&D WITH ORACLE SOA
While R&D WITH ORACLE SOA
 
Synch calling asynchadd
Synch calling asynchaddSynch calling asynchadd
Synch calling asynchadd
 
Stored procedure
Stored procedureStored procedure
Stored procedure
 
Mediator-ORACLE SOA
Mediator-ORACLE SOAMediator-ORACLE SOA
Mediator-ORACLE SOA
 
Manual device+settings ORACLE SOA
Manual device+settings ORACLE SOAManual device+settings ORACLE SOA
Manual device+settings ORACLE SOA
 
Jndicreation of database adapter
Jndicreation of database adapterJndicreation of database adapter
Jndicreation of database adapter
 
Humantask MAKE EASY DUDE
Humantask  MAKE EASY DUDEHumantask  MAKE EASY DUDE
Humantask MAKE EASY DUDE
 
File2db
File2dbFile2db
File2db
 
Exceptionhandling4remote fault
Exceptionhandling4remote faultExceptionhandling4remote fault
Exceptionhandling4remote fault
 
Dvm
DvmDvm
Dvm
 
whileloop
whileloopwhileloop
whileloop
 

Recently uploaded

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Recently uploaded (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Adaptersdb-03-file2storedprocedure

  • 1. Oracle SOA Suite 11g - Sample SAMPLE NAME: adapters-db-103-File2StoredProcedure COMPONENT: DB Adapter for Stored Procedures OVERVIEW This sample illustrates the use of the File Adapter interfacing with a stored procedure invocation. The File Adapter reads a file from an input directory. The contents of that file provide the value for the input parameter of the stored procedure. The value is a collection of customers or, more specifically, a nested table of a customer object type. The stored procedure iterates through the collection and inserts the data for each customer into a ‘customers’ table. PROVIDED FILES Provided are the following files • The SQL script needed to create the database schema objects. • The generated XSD for the stored procedure. • The payload for the file adapter to provide input to the stored procedure. STEP BY STEP INSTRUCTIONS RUNNING THE PREBUILT SAMPLE Creating the Schema Objects and the Stored Procedure The schema objects and the stored procedure are created using SQL*Plus. The DDL statements for creating the data types and tables are CREATE TYPE address AS OBJECT ( street VARCHAR2(20), city VARCHAR2(15), state CHAR(2), zip CHAR(5) ); CREATE TYPE customer AS OBJECT ( fname VARCHAR2(10),
  • 2. Oracle SOA Suite 11g - Sample lname VARCHAR2(10), loc address, email VARCHAR2(25), phone VARCHAR2(15) ); CREATE TYPE collection AS TABLE OF customer; CREATE TABLE customers ( name VARCHAR2(25), loc VARCHAR2(45), email VARCHAR2(25), phone VARCHAR2(15) ); The stored procedure is created using this statement CREATE PROCEDURE add_customers(c IN collection) AS BEGIN FOR i IN c.FIRST .. c.LAST LOOP INSERT INTO customers VALUES ( c(i).lname || ', ' || c(i).fname, c(i).loc.street || ', ' || c(i).loc.city || ', ' || c(i).loc.state || ' ' || c(i).loc.zip, c(i).email, c(i).phone ); END LOOP; END; Connect to the database as SCOTT/TIGER and execute the contents of customers.sql using SQL*Plus. RUNNING THE SAMPLE Deploying the BPEL Process 1. Create a new connection instance in the weblogic-ra.xml file. <connection-instance> <jndi-name>eis/DB/oracle</jndi-name> <connection-properties> <properties> <property> <name>xADataSourceName</name> <value>jdbc/OracleDataSource</value> </property> <property> <name>dataSourceName</name> <value></value> </property> </properties> </connection-properties> </connection-instance> 2. Create a new data source for the JNDI name specified via the <jndi-name> element of the connection instance (i.e. eis/DB/oracle). a. Connect to the WebLogic Server Administration Console. b. Click the “Data Sources” link under the JDBC list item in the Services section.
  • 3. Oracle SOA Suite 11g - Sample c. Enter “OracleDataSource” as the name and use the xADataSourceName as the JNDI Name. d. Select the Oracle Database Type and Oracle’s Driver (Thin XA) for instance connections; Versions 9.0.1,9.20,10,11. e. Enter the Connection Properties and click “Test Configuration”. f. Deploy the data source to the “AdminServer” target. 3. In JDeveloper, right-click the project name and choose “Deploy” then “Deploy to Application Server”. Accept the default deployment configuration. Check the “Overwrite any existing composites with the same revision ID” checkbox if an archive with the same revision ID has already been deployed. 4. Select an existing Application Server or create a connection to a new one. Choose to deploy the archive to the soa_server1. 5. To verify that the application has been deployed successfully, click the “Deployment” tab at the bottom of JDeveloper. This will show you the deployment log. 6. Login to Enterprise Manager. The “File2SP [1.0]” archive will be listed in the Deployments area. Figure 1: Successfully Deployed Archive TESTING THE BPEL PROCESS Copy customers.xml to the directory for incoming files of the File Adapter service to initiate the BPEL process. VERIFYING EXECUTION Login as SCOTT/TIGER using SQL*Plus and query the customers table. SQL> select * from customers; NAME LOC ------------------------- --------------------------------------- ------ EMAIL PHONE ------------------------- --------------- Doe, John 123 Main Street, Anytown, CA 12345 john.smith@gmail.com 567-123-9876 Doe, Jane 987 Sunset Blvd, Sometown, CA 34567 JaneDoe@yahoo.com 567-123-9876 Click on the “File2SP [1.0]” link in Enterprise Manager. Click the “Instances” tab. Click the Instance ID associated with the most recent execution. Look at the Trace.
  • 4. Oracle SOA Suite 11g - Sample Figure 2: Trace Results from the Test Instance Click the BPELProcess link to look at the instance data. Expand the <payload> of the Invoke activity to see the input from the file passed to the stored procedure. Figure 3: Input Parameter Value for the Stored Procedure BUILDING THE SAMPLE CONFIGURING THE OUTBOUND ADAPTER SERVICE
  • 5. Oracle SOA Suite 11g - Sample 1. Launch JDeveloper. 2. Create a new SOA Application called “File2SPApp”. Create a project called “File2SP” with SOA Project Technologies selected. Select “Composite with BPEL”. 3. Create a BPEL process called “BPELProcess” and select “Define Service Later” from the list of Templates. 4. From the BPEL Services area drag and drop a Database Adapter service to the right swim lane. Provide “AddCustomers” as the Service Name. 5. Choose an existing service connection or create a new one. The connection must be to SCOTT/TIGER where the schema objects were created. Figure 4: Establishing a Service Connection 6. Select “Call a Stored Procedure or Function” then browse for and select the ADD_CUSTOMERS stored procedure. Figure 5: Choosing a Stored Procedure 7. Click through the remaining pages of the wizard until you reach the Finish page. Click “Finish” to end the wizard.
  • 6. Oracle SOA Suite 11g - Sample CONFIGURING THE INBOUND ADAPTER SERVICE 1. From the BPEL Services area drag and drop a File Adapter service to the left swim lane. Provide “ReadFile” as the Service Name and select “Define from operation and schema (specified later).” 2. Select “Read File” as the Operation Type. Specify a physical directory path for incoming files. Specify a name pattern for incoming files to read and provide a polling frequency. 3. On the Messages page click the search icon to look up a URL. Select “InputParameters” from the SCOTT_ADD_CUSTOMERS.xsd project schema file. Click “Finish on the Finish page. CONFIGURING AN END TO END BPEL PROCESS 1. Under BPEL Activities drag a Receive activity and drop it where it says “Drop Activity Here” in the process diagram. 2. Right-click the Receive activity and choose Edit. Name the activity “Receive” and select ReadFile as the partner link. Auto-create the variable. Check the box marked “Create Instance.” Figure 6: Configuring the Receive Activity 3. Drag an Invoke activity and drop it after the Receive activity. Right click on the Invoke and choose “Edit”. Name the activity “Invoke”. Use the Flashlight to find and choose the “AddCustomers” Partner Link. Auto-create the Input variable.
  • 7. Oracle SOA Suite 11g - Sample Figure 7: Configuring the Invoke Activity 4. Provide a value for the stored procedure’s input variable by dragging an Assign activity into the diagram, positioning it between the Receive and Invoke activities. Right click the assign and choose “Edit”. Choose “Copy Operation” from the dropdown (the green “+”) in the “Copy Operation” tab to copy the value read from the file to the input parameter of the stored procedure. Figure 8: Coping the Input Read from the File to the Input Parameter Use the “General” tab to provide a name for the Assign (e.g. “Input”). 5. This completes the modeling of the BPEL Process. The diagramming between the receiveInput and replyOutput activities should look similar to the following
  • 8. Oracle SOA Suite 11g - Sample Figure 9: The Complete BPEL Process 6. Click the “composite.xml” tab and choose the “Design” view. The composite should resemble Figure 10: Complete Composite Structure Diagram