SlideShare a Scribd company logo
How to use Database Component using
Stored Procedure
02-02-2016
Abstract
• The main motto of this PPT is how to use Database component using
stored procedure call in our mule applications.
Introduction
• The Database component can also use to call stored procedure call
with In and Out parameters to get the results from DB, then returns
the original message as Map having required column names as keys
and column values as values to the flow.
Example
.mflow
• <?xml version="1.0" encoding="UTF-8"?>
• <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http"
• xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
• xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
• http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd">
• <http:listener-config name="HTTP_procedureListener" host="localhost" port="8083" basePath="procedure" doc:name="HTTP Listener Configuration"/>
• <spring:beans>
• <spring:bean id="HoplaOracleDataSourceBean" name="HoplaOracleDataSourceBean" class="org.enhydra.jdbc.standard.StandardDataSource">
• <spring:property name="driverName" value="${ehbe.oracle.db.driverName}"/>
• <spring:property name="url" value="${ehbe.oracle.db.url}"/>
• <spring:property name="user" value="${ehbe.oracle.db.user}"/>
• <spring:property name="password" value="${ehbe.oracle.db.password}"/>
• </spring:bean>
• </spring:beans>
• <db:generic-config name="Hopla_Database_Configuration" doc:name="Generic Database Configuration" dataSource-ref="HoplaOracleDataSourceBean"/>
• <flow name="proceduretestFlow">
• <http:listener config-ref="HTTP_procedureListener" path="/" doc:name="HTTP"/>
• <db:stored-procedure config-ref="Hopla_Database_Configuration" doc:name="Database">
• <db:parameterized-query><![CDATA[call GET_CITY(:GEO_LOCATION_CODE,:STATE_NAME)]]></db:parameterized-query>
• <db:in-param name="GEO_LOCATION_CODE" type="INTEGER" value="#[message.inboundProperties.'http.query.params'.geocode]"/>
• <db:out-param name="STATE_NAME" type="VARCHAR"/>
• </db:stored-procedure>
• <logger message="State name for given GeoCode is :: :: #[payload]" level="INFO" doc:name="Logger"/>
• </flow>
• </mule>
• INFO 2016-02-10 15:45:57,385 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: proceduretestFlow.stage1
• INFO 2016-02-10 15:45:57,434 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://localhost:8081/Demo1
• INFO 2016-02-10 15:45:57,444 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://localhost:8082/test
• INFO 2016-02-10 15:45:57,452 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://localhost:8083/procedure
• INFO 2016-02-10 15:45:57,459 [main] org.mule.module.management.agent.WrapperManagerAgent: This JVM hasn't been launched by the wrapper, the agent will not run.
• INFO 2016-02-10 15:45:57,498 [main] org.mule.module.management.agent.AbstractJmxAgent: Attempting to register service with name:
• Mule.sample:type=Endpoint,service="sampleFlow1",connector=connector.VM.mule.default,name="endpoint.vm.US"
• INFO 2016-02-10 15:45:57,499 [main] org.mule.module.management.agent.AbstractJmxAgent: Registered Endpoint Service with name:
• Mule.sample:type=Endpoint,service="sampleFlow1",connector=connector.VM.mule.default,name="endpoint.vm.US"
• INFO 2016-02-10 15:45:57,501 [main] org.mule.module.management.agent.AbstractJmxAgent: Registered Connector Service with name
Mule.sample:type=Connector,name="connector.VM.mule.default.1"
• INFO 2016-02-10 15:45:57,504 [main] org.mule.DefaultMuleContext:
• **********************************************************************
• * Application: sample *
• **********************************************************************
• INFO 2016-02-10 15:45:57,504 [main] org.mule.module.launcher.MuleDeploymentService:
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• + Started app 'sample' +
• ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
• INFO 2016-02-10 15:45:57,524 [main] org.mule.module.launcher.StartupSummaryDeploymentListener:
• **********************************************************************
• * - - + DOMAIN + - - * - - + STATUS + - - *
• **********************************************************************
• * default * DEPLOYED *
• *******************************************************************************************************
• * - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - *
• *******************************************************************************************************
• * sample * default * DEPLOYED *
• *******************************************************************************************************
• Flow of execution:
1. URL to trigger the service from browser
http://localhost:8083/procedure?geocode=63573
2. Database component connects to the specific
database, executes the selected procedure by
taking and prints the result as Map.
References
• http://forums.mulesoft.com/questions/1602/execute-
mssql-stored-procedure-in-mule-ce-3-5-anypoint.html

More Related Content

What's hot

Spring introduction
Spring introductionSpring introduction
Spring introduction
AnilKumar Etagowni
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
prudhvivreddy
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
javeed_mhd
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
javeed_mhd
 
MuleSoft ESB Routes first-successful
MuleSoft ESB Routes first-successfulMuleSoft ESB Routes first-successful
MuleSoft ESB Routes first-successful
akashdprajapati
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
Rajkattamuri
 
Quartz component in mule demo
Quartz component in mule demoQuartz component in mule demo
Quartz component in mule demo
Sudha Ch
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Component
kumar gaurav
 
Simple Poll in Mule
Simple Poll in MuleSimple Poll in Mule
Simple Poll in Mule
Christian Hipolito
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
Mohammed246
 
Running ms sql stored procedures in mule
Running ms sql stored procedures in muleRunning ms sql stored procedures in mule
Running ms sql stored procedures in mule
AnilKumar Etagowni
 
Configurare http mule
Configurare http muleConfigurare http mule
Configurare http mule
Antonio Pellegrino
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
AnilKumar Etagowni
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
Mohammed246
 

What's hot (14)

Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Basic example using for each component
Basic example using for each componentBasic example using for each component
Basic example using for each component
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
 
MuleSoft ESB Routes first-successful
MuleSoft ESB Routes first-successfulMuleSoft ESB Routes first-successful
MuleSoft ESB Routes first-successful
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Quartz component in mule demo
Quartz component in mule demoQuartz component in mule demo
Quartz component in mule demo
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Component
 
Simple Poll in Mule
Simple Poll in MuleSimple Poll in Mule
Simple Poll in Mule
 
Expression filter in Mule
Expression filter in MuleExpression filter in Mule
Expression filter in Mule
 
Running ms sql stored procedures in mule
Running ms sql stored procedures in muleRunning ms sql stored procedures in mule
Running ms sql stored procedures in mule
 
Configurare http mule
Configurare http muleConfigurare http mule
Configurare http mule
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Mule Esb Data Weave
Mule Esb Data WeaveMule Esb Data Weave
Mule Esb Data Weave
 

Viewers also liked

How to use cache scope component
How to use cache scope componentHow to use cache scope component
How to use cache scope component
prathyusha vadla
 
Ed103format3 complete summary.docx[1]
Ed103format3 complete summary.docx[1]Ed103format3 complete summary.docx[1]
Ed103format3 complete summary.docx[1]
mark maneb
 
Claudia_Testanera_gennaio_2016
Claudia_Testanera_gennaio_2016Claudia_Testanera_gennaio_2016
Claudia_Testanera_gennaio_2016Claudia Testanera
 
Question 5
Question 5Question 5
Question 5
Amber Barnett
 
Materiales en la informatica
Materiales en la informaticaMateriales en la informatica
Materiales en la informatica
MarioVaz Vazquez
 
Proceedings of-the-waste-safe-2015 (1)
Proceedings of-the-waste-safe-2015 (1)Proceedings of-the-waste-safe-2015 (1)
Proceedings of-the-waste-safe-2015 (1)
Mushfiqur Rahman
 
How to Make a Lavamanos-RoundBASE
How to Make a Lavamanos-RoundBASEHow to Make a Lavamanos-RoundBASE
How to Make a Lavamanos-RoundBASELynn Roberts
 
Question 5
Question 5Question 5
Question 5
Amber Barnett
 
Man and van bournemouth
Man and van bournemouthMan and van bournemouth
Man and van bournemouth
A Man and Van 247
 
Question 5
Question 5Question 5
Question 5
Amber Barnett
 
Ancillary Development
Ancillary Development Ancillary Development
Ancillary Development
sophie robinson
 
Question 2
Question 2Question 2
Question 2
Amber Barnett
 
Effects
EffectsEffects
прислівник
прислівникприслівник
прислівник
Mariya Yudina
 
Team Pique UHC Case Comp Slide Deck
Team Pique UHC Case Comp Slide DeckTeam Pique UHC Case Comp Slide Deck
Team Pique UHC Case Comp Slide DeckAnukriti Kurria
 
Construction of digipak
Construction of digipakConstruction of digipak
Construction of digipak
sophie robinson
 
The production schedule
The production scheduleThe production schedule
The production schedule
sophie robinson
 
Foodies April16 v3
Foodies April16 v3Foodies April16 v3
Foodies April16 v3Sahiri Loing
 

Viewers also liked (18)

How to use cache scope component
How to use cache scope componentHow to use cache scope component
How to use cache scope component
 
Ed103format3 complete summary.docx[1]
Ed103format3 complete summary.docx[1]Ed103format3 complete summary.docx[1]
Ed103format3 complete summary.docx[1]
 
Claudia_Testanera_gennaio_2016
Claudia_Testanera_gennaio_2016Claudia_Testanera_gennaio_2016
Claudia_Testanera_gennaio_2016
 
Question 5
Question 5Question 5
Question 5
 
Materiales en la informatica
Materiales en la informaticaMateriales en la informatica
Materiales en la informatica
 
Proceedings of-the-waste-safe-2015 (1)
Proceedings of-the-waste-safe-2015 (1)Proceedings of-the-waste-safe-2015 (1)
Proceedings of-the-waste-safe-2015 (1)
 
How to Make a Lavamanos-RoundBASE
How to Make a Lavamanos-RoundBASEHow to Make a Lavamanos-RoundBASE
How to Make a Lavamanos-RoundBASE
 
Question 5
Question 5Question 5
Question 5
 
Man and van bournemouth
Man and van bournemouthMan and van bournemouth
Man and van bournemouth
 
Question 5
Question 5Question 5
Question 5
 
Ancillary Development
Ancillary Development Ancillary Development
Ancillary Development
 
Question 2
Question 2Question 2
Question 2
 
Effects
EffectsEffects
Effects
 
прислівник
прислівникприслівник
прислівник
 
Team Pique UHC Case Comp Slide Deck
Team Pique UHC Case Comp Slide DeckTeam Pique UHC Case Comp Slide Deck
Team Pique UHC Case Comp Slide Deck
 
Construction of digipak
Construction of digipakConstruction of digipak
Construction of digipak
 
The production schedule
The production scheduleThe production schedule
The production schedule
 
Foodies April16 v3
Foodies April16 v3Foodies April16 v3
Foodies April16 v3
 

Similar to How to use database component using stored procedure call

Choice component
Choice component Choice component
Choice component
Sunil Komarapu
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
javeed_mhd
 
Mule Choice component
Mule Choice component Mule Choice component
Mule Choice component
AbdulImrankhan7
 
Choice component
Choice component Choice component
Choice component
F K
 
How to use Request Reply scope
How to use Request Reply scopeHow to use Request Reply scope
How to use Request Reply scope
sivachandra mandalapu
 
How to use choice component
How to use choice componentHow to use choice component
How to use choice component
maheshtheapex
 
Mule-choice component
Mule-choice componentMule-choice component
Mule-choice component
DivyaSree1391
 
For Each Component
For Each ComponentFor Each Component
For Each Component
Durga Prasad Kakarla
 
For each component
For each component For each component
For each component
F K
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
javeed_mhd
 
For each component
For each component For each component
For each component
Sunil Komarapu
 
For each component
For each component For each component
For each component
AbdulImrankhan7
 
How to use for each component
How to use for each componentHow to use for each component
How to use for each component
maheshtheapex
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
sivachandra mandalapu
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
javeed_mhd
 
Message properties component
Message properties component Message properties component
Message properties component
Sunil Komarapu
 
Message properties component
Message properties componentMessage properties component
Message properties component
F K
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
maheshtheapex
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
Sudha Ch
 
How to use poll scope
How to use poll scopeHow to use poll scope
How to use poll scope
sivachandra mandalapu
 

Similar to How to use database component using stored procedure call (20)

Choice component
Choice component Choice component
Choice component
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
 
Mule Choice component
Mule Choice component Mule Choice component
Mule Choice component
 
Choice component
Choice component Choice component
Choice component
 
How to use Request Reply scope
How to use Request Reply scopeHow to use Request Reply scope
How to use Request Reply scope
 
How to use choice component
How to use choice componentHow to use choice component
How to use choice component
 
Mule-choice component
Mule-choice componentMule-choice component
Mule-choice component
 
For Each Component
For Each ComponentFor Each Component
For Each Component
 
For each component
For each component For each component
For each component
 
For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
For each component
For each component For each component
For each component
 
For each component
For each component For each component
For each component
 
How to use for each component
How to use for each componentHow to use for each component
How to use for each component
 
Collection aggregator
Collection aggregatorCollection aggregator
Collection aggregator
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Message properties component
Message properties component Message properties component
Message properties component
 
Message properties component
Message properties componentMessage properties component
Message properties component
 
How to use message properties component
How to use message properties componentHow to use message properties component
How to use message properties component
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
 
How to use poll scope
How to use poll scopeHow to use poll scope
How to use poll scope
 

Recently uploaded

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 

Recently uploaded (20)

Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 

How to use database component using stored procedure call

  • 1. How to use Database Component using Stored Procedure 02-02-2016
  • 2. Abstract • The main motto of this PPT is how to use Database component using stored procedure call in our mule applications.
  • 3. Introduction • The Database component can also use to call stored procedure call with In and Out parameters to get the results from DB, then returns the original message as Map having required column names as keys and column values as values to the flow.
  • 5. .mflow • <?xml version="1.0" encoding="UTF-8"?> • <mule xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http" • xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" • xsi:schemaLocation="http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd • http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd"> • <http:listener-config name="HTTP_procedureListener" host="localhost" port="8083" basePath="procedure" doc:name="HTTP Listener Configuration"/> • <spring:beans> • <spring:bean id="HoplaOracleDataSourceBean" name="HoplaOracleDataSourceBean" class="org.enhydra.jdbc.standard.StandardDataSource"> • <spring:property name="driverName" value="${ehbe.oracle.db.driverName}"/> • <spring:property name="url" value="${ehbe.oracle.db.url}"/> • <spring:property name="user" value="${ehbe.oracle.db.user}"/> • <spring:property name="password" value="${ehbe.oracle.db.password}"/> • </spring:bean> • </spring:beans> • <db:generic-config name="Hopla_Database_Configuration" doc:name="Generic Database Configuration" dataSource-ref="HoplaOracleDataSourceBean"/> • <flow name="proceduretestFlow"> • <http:listener config-ref="HTTP_procedureListener" path="/" doc:name="HTTP"/> • <db:stored-procedure config-ref="Hopla_Database_Configuration" doc:name="Database"> • <db:parameterized-query><![CDATA[call GET_CITY(:GEO_LOCATION_CODE,:STATE_NAME)]]></db:parameterized-query> • <db:in-param name="GEO_LOCATION_CODE" type="INTEGER" value="#[message.inboundProperties.'http.query.params'.geocode]"/> • <db:out-param name="STATE_NAME" type="VARCHAR"/> • </db:stored-procedure> • <logger message="State name for given GeoCode is :: :: #[payload]" level="INFO" doc:name="Logger"/> • </flow> • </mule>
  • 6. • INFO 2016-02-10 15:45:57,385 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: proceduretestFlow.stage1 • INFO 2016-02-10 15:45:57,434 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://localhost:8081/Demo1 • INFO 2016-02-10 15:45:57,444 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://localhost:8082/test • INFO 2016-02-10 15:45:57,452 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://localhost:8083/procedure • INFO 2016-02-10 15:45:57,459 [main] org.mule.module.management.agent.WrapperManagerAgent: This JVM hasn't been launched by the wrapper, the agent will not run. • INFO 2016-02-10 15:45:57,498 [main] org.mule.module.management.agent.AbstractJmxAgent: Attempting to register service with name: • Mule.sample:type=Endpoint,service="sampleFlow1",connector=connector.VM.mule.default,name="endpoint.vm.US" • INFO 2016-02-10 15:45:57,499 [main] org.mule.module.management.agent.AbstractJmxAgent: Registered Endpoint Service with name: • Mule.sample:type=Endpoint,service="sampleFlow1",connector=connector.VM.mule.default,name="endpoint.vm.US" • INFO 2016-02-10 15:45:57,501 [main] org.mule.module.management.agent.AbstractJmxAgent: Registered Connector Service with name Mule.sample:type=Connector,name="connector.VM.mule.default.1" • INFO 2016-02-10 15:45:57,504 [main] org.mule.DefaultMuleContext: • ********************************************************************** • * Application: sample * • ********************************************************************** • INFO 2016-02-10 15:45:57,504 [main] org.mule.module.launcher.MuleDeploymentService: • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • + Started app 'sample' + • ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ • INFO 2016-02-10 15:45:57,524 [main] org.mule.module.launcher.StartupSummaryDeploymentListener: • ********************************************************************** • * - - + DOMAIN + - - * - - + STATUS + - - * • ********************************************************************** • * default * DEPLOYED * • ******************************************************************************************************* • * - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - * • ******************************************************************************************************* • * sample * default * DEPLOYED * • *******************************************************************************************************
  • 7. • Flow of execution: 1. URL to trigger the service from browser http://localhost:8083/procedure?geocode=63573 2. Database component connects to the specific database, executes the selected procedure by taking and prints the result as Map.