SlideShare a Scribd company logo
INVOKE COMPONENT DEMO IN MULE
The Invoke component invokes a method of an object
defined in a Spring bean. You can provide an array of
argument expressions to map the message to the
method arguments. Mule determines which method to
use via the method name, along with the number of
argument expressions provided.
Configuring the Java Class
• Use the Invoke component when you have an existing
method defined in custom Java code that you wish to use
in processing a message.
• Create a new Mule project. Click File > New > Mule
Project and name the project demo.
• Create a new Java class. In Package Explorer, right-
click src/main/java and click New > Class.
Http configuration and global element
Create mule flow like below
Invoke component configuration
Create a class src/main/java
Name the class InvokeDemo.
Create java class like below
Class here
• package invokedemo;
• public class InvokeDemo {
• public String starCall(String name) {
• return String.format("Hello %s!", name);
• }
• public String endCall(String name) {
• return String.format("Goodbye %s!", name);
• }
• }
CreateYour Spring Bean
To reference your Java, Mule requires a Spring bean to declare the class path.
Click on global element and create Bean like below
Run As Mule application
• And type this url on browser, we can get the following
result
• http://localhost:8081/call?name=krishna
• Hello krishna!

More Related Content

What's hot

Example mule
Example muleExample mule
Example mule
JavierMarRas
 
Troubleshooting mule
Troubleshooting muleTroubleshooting mule
Troubleshooting mule
Son Nguyen
 
MUnit run and wait scope
MUnit run and wait scopeMUnit run and wait scope
MUnit run and wait scope
Shanky Gupta
 
Mule management console installation with Tomcat
Mule management console installation with TomcatMule management console installation with Tomcat
Mule management console installation with Tomcat
Sudha Ch
 
Java mule
Java muleJava mule
Java mule
Gandham38
 
Mule testing
Mule   testingMule   testing
Mule testing
Sindhu VL
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmule
Srikrishna k
 
Idempotent filter in mule
Idempotent filter in muleIdempotent filter in mule
Idempotent filter in mule
Mohammed246
 
Anypoint mq acknowledgement mode
Anypoint mq acknowledgement modeAnypoint mq acknowledgement mode
Anypoint mq acknowledgement mode
Son Nguyen
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
Khasim Saheb
 
Mule
MuleMule
Mule
irfan1008
 
Mule velocity
Mule velocityMule velocity
Mule velocity
Praneethchampion
 
Running mule as worker role on azure
Running mule as worker role on azureRunning mule as worker role on azure
Running mule as worker role on azure
Son Nguyen
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
F K
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2
Anirban Sen Chowdhary
 
Mule - logger
Mule -  loggerMule -  logger
Mule - logger
Ankush Sharma
 
Running mule standalone
Running mule standaloneRunning mule standalone
Running mule standalone
Son Nguyen
 

What's hot (17)

Example mule
Example muleExample mule
Example mule
 
Troubleshooting mule
Troubleshooting muleTroubleshooting mule
Troubleshooting mule
 
MUnit run and wait scope
MUnit run and wait scopeMUnit run and wait scope
MUnit run and wait scope
 
Mule management console installation with Tomcat
Mule management console installation with TomcatMule management console installation with Tomcat
Mule management console installation with Tomcat
 
Java mule
Java muleJava mule
Java mule
 
Mule testing
Mule   testingMule   testing
Mule testing
 
Introduction testingmule
Introduction testingmuleIntroduction testingmule
Introduction testingmule
 
Idempotent filter in mule
Idempotent filter in muleIdempotent filter in mule
Idempotent filter in mule
 
Anypoint mq acknowledgement mode
Anypoint mq acknowledgement modeAnypoint mq acknowledgement mode
Anypoint mq acknowledgement mode
 
Deploying and Running in Mule
Deploying and Running in MuleDeploying and Running in Mule
Deploying and Running in Mule
 
Mule
MuleMule
Mule
 
Mule velocity
Mule velocityMule velocity
Mule velocity
 
Running mule as worker role on azure
Running mule as worker role on azureRunning mule as worker role on azure
Running mule as worker role on azure
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2
 
Mule - logger
Mule -  loggerMule -  logger
Mule - logger
 
Running mule standalone
Running mule standaloneRunning mule standalone
Running mule standalone
 

Similar to Invoke component demo in mule

Invoke component
Invoke componentInvoke component
Invoke component
Srilatha Kante
 
Simpletest - A beginners guide
Simpletest - A beginners guideSimpletest - A beginners guide
Simpletest - A beginners guide
Ed Conolly
 
Java component
Java componentJava component
Java component
Srilatha Kante
 
C++ to java
C++ to javaC++ to java
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
Dmitry Bakaleinik
 
Process program9 cm604.5
Process program9 cm604.5Process program9 cm604.5
Process program9 cm604.5
myrajendra
 
Integrating Maven with Eclipse
Integrating Maven with EclipseIntegrating Maven with Eclipse
Integrating Maven with Eclipse
Nikhil Bharati
 
Maven
MavenMaven
Maven
Shraddha
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)
Prof. Erwin Globio
 
02-Basic-Java-Syntax.pdf
02-Basic-Java-Syntax.pdf02-Basic-Java-Syntax.pdf
02-Basic-Java-Syntax.pdf
erusmala888
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
tuyambazejeanclaude
 
How to start learning java
How to start learning javaHow to start learning java
How to start learning java
billgatewilliam
 
Java lab-manual
Java lab-manualJava lab-manual
Java lab-manual
Khurshid Asghar
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
Bhushan Nagaraj
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
Puppet
 
Maven basic concept
Maven basic conceptMaven basic concept
Maven basic concept
Ming-Sian Lin
 
Writing documentation with Asciidoctor
Writing documentation  with  AsciidoctorWriting documentation  with  Asciidoctor
Writing documentation with Asciidoctor
Jérémie Bresson
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
loidasacueza
 
Java scjp-part1
Java scjp-part1Java scjp-part1
Java scjp-part1
Raghavendra V Gayakwad
 
JavaScript Coding with Class
JavaScript Coding with ClassJavaScript Coding with Class
JavaScript Coding with Class
davidwalsh83
 

Similar to Invoke component demo in mule (20)

Invoke component
Invoke componentInvoke component
Invoke component
 
Simpletest - A beginners guide
Simpletest - A beginners guideSimpletest - A beginners guide
Simpletest - A beginners guide
 
Java component
Java componentJava component
Java component
 
C++ to java
C++ to javaC++ to java
C++ to java
 
Introduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS worldIntroduction to maven, its configuration, lifecycle and relationship to JS world
Introduction to maven, its configuration, lifecycle and relationship to JS world
 
Process program9 cm604.5
Process program9 cm604.5Process program9 cm604.5
Process program9 cm604.5
 
Integrating Maven with Eclipse
Integrating Maven with EclipseIntegrating Maven with Eclipse
Integrating Maven with Eclipse
 
Maven
MavenMaven
Maven
 
JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)JAVA Object Oriented Programming (OOP)
JAVA Object Oriented Programming (OOP)
 
02-Basic-Java-Syntax.pdf
02-Basic-Java-Syntax.pdf02-Basic-Java-Syntax.pdf
02-Basic-Java-Syntax.pdf
 
Java_notes.ppt
Java_notes.pptJava_notes.ppt
Java_notes.ppt
 
How to start learning java
How to start learning javaHow to start learning java
How to start learning java
 
Java lab-manual
Java lab-manualJava lab-manual
Java lab-manual
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
Maven basic concept
Maven basic conceptMaven basic concept
Maven basic concept
 
Writing documentation with Asciidoctor
Writing documentation  with  AsciidoctorWriting documentation  with  Asciidoctor
Writing documentation with Asciidoctor
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
 
Java scjp-part1
Java scjp-part1Java scjp-part1
Java scjp-part1
 
JavaScript Coding with Class
JavaScript Coding with ClassJavaScript Coding with Class
JavaScript Coding with Class
 

More from Ramakrishna kapa

Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
Ramakrishna kapa
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
Ramakrishna kapa
 
Batch processing
Batch processingBatch processing
Batch processing
Ramakrishna kapa
 
Msmq connectivity
Msmq connectivityMsmq connectivity
Msmq connectivity
Ramakrishna kapa
 
Scopes in mule
Scopes in muleScopes in mule
Scopes in mule
Ramakrishna kapa
 
Data weave more operations
Data weave more operationsData weave more operations
Data weave more operations
Ramakrishna kapa
 
Basic math operations using dataweave
Basic math operations using dataweaveBasic math operations using dataweave
Basic math operations using dataweave
Ramakrishna kapa
 
Dataweave types operators
Dataweave types operatorsDataweave types operators
Dataweave types operators
Ramakrishna kapa
 
Operators in mule dataweave
Operators in mule dataweaveOperators in mule dataweave
Operators in mule dataweave
Ramakrishna kapa
 
Data weave in mule
Data weave in muleData weave in mule
Data weave in mule
Ramakrishna kapa
 
Servicenow connector
Servicenow connectorServicenow connector
Servicenow connector
Ramakrishna kapa
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
Ramakrishna kapa
 
Choice flow control
Choice flow controlChoice flow control
Choice flow control
Ramakrishna kapa
 
Message enricher example
Message enricher exampleMessage enricher example
Message enricher example
Ramakrishna kapa
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
Ramakrishna kapa
 
Anypoint connector basics
Anypoint connector basicsAnypoint connector basics
Anypoint connector basics
Ramakrishna kapa
 
Mule global elements
Mule global elementsMule global elements
Mule global elements
Ramakrishna kapa
 
Mule message structure and varibles scopes
Mule message structure and varibles scopesMule message structure and varibles scopes
Mule message structure and varibles scopes
Ramakrishna kapa
 
How to create an api in mule
How to create an api in muleHow to create an api in mule
How to create an api in mule
Ramakrishna kapa
 
Log4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexibleLog4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexible
Ramakrishna kapa
 

More from Ramakrishna kapa (20)

Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Batch processing
Batch processingBatch processing
Batch processing
 
Msmq connectivity
Msmq connectivityMsmq connectivity
Msmq connectivity
 
Scopes in mule
Scopes in muleScopes in mule
Scopes in mule
 
Data weave more operations
Data weave more operationsData weave more operations
Data weave more operations
 
Basic math operations using dataweave
Basic math operations using dataweaveBasic math operations using dataweave
Basic math operations using dataweave
 
Dataweave types operators
Dataweave types operatorsDataweave types operators
Dataweave types operators
 
Operators in mule dataweave
Operators in mule dataweaveOperators in mule dataweave
Operators in mule dataweave
 
Data weave in mule
Data weave in muleData weave in mule
Data weave in mule
 
Servicenow connector
Servicenow connectorServicenow connector
Servicenow connector
 
Introduction to testing mule
Introduction to testing muleIntroduction to testing mule
Introduction to testing mule
 
Choice flow control
Choice flow controlChoice flow control
Choice flow control
 
Message enricher example
Message enricher exampleMessage enricher example
Message enricher example
 
Mule exception strategies
Mule exception strategiesMule exception strategies
Mule exception strategies
 
Anypoint connector basics
Anypoint connector basicsAnypoint connector basics
Anypoint connector basics
 
Mule global elements
Mule global elementsMule global elements
Mule global elements
 
Mule message structure and varibles scopes
Mule message structure and varibles scopesMule message structure and varibles scopes
Mule message structure and varibles scopes
 
How to create an api in mule
How to create an api in muleHow to create an api in mule
How to create an api in mule
 
Log4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexibleLog4j is a reliable, fast and flexible
Log4j is a reliable, fast and flexible
 

Recently uploaded

A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
Peter Muessig
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
XfilesPro
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 

Recently uploaded (20)

A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
UI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design SystemUI5con 2024 - Bring Your Own Design System
UI5con 2024 - Bring Your Own Design System
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 

Invoke component demo in mule

  • 1. INVOKE COMPONENT DEMO IN MULE The Invoke component invokes a method of an object defined in a Spring bean. You can provide an array of argument expressions to map the message to the method arguments. Mule determines which method to use via the method name, along with the number of argument expressions provided.
  • 2. Configuring the Java Class • Use the Invoke component when you have an existing method defined in custom Java code that you wish to use in processing a message. • Create a new Mule project. Click File > New > Mule Project and name the project demo. • Create a new Java class. In Package Explorer, right- click src/main/java and click New > Class.
  • 3. Http configuration and global element
  • 4. Create mule flow like below
  • 6. Create a class src/main/java
  • 7. Name the class InvokeDemo.
  • 8. Create java class like below
  • 9. Class here • package invokedemo; • public class InvokeDemo { • public String starCall(String name) { • return String.format("Hello %s!", name); • } • public String endCall(String name) { • return String.format("Goodbye %s!", name); • } • }
  • 10. CreateYour Spring Bean To reference your Java, Mule requires a Spring bean to declare the class path. Click on global element and create Bean like below
  • 11. Run As Mule application • And type this url on browser, we can get the following result • http://localhost:8081/call?name=krishna • Hello krishna!