SlideShare a Scribd company logo
 Components can use bindings to call an external
service during execution.
 The bindings used with a Java component bind a
Java interface, or single interface method, to an
outbound endpoint.
 The external service to be called should implement
the same interface, and the component should
encapsulate a reference to that interface, which is
initialized during the bootstrap stage by the Mule
configuration builder.
 The reference will be initialized using a reflective
proxy class.
 With component bindings, you can configure
multiple interfaces or a single interface with
an endpoint bound to one or more Mule
endpoints.
 Mule currently supports component bindings
for Java components (the default
components in Mule) and script components,
such as Groovy or JRuby. This page
describes how to configure each.
 Bindings can be used by components to call out to an
external service.
 The bound interface is added to the component as a field
with the usual bean getter and setter methods. In the
binding configuration for the component, you can bind this
interface along with a method in the interface to a Mule
endpoint.
 When that method is called, the call parameters are sent
over the Mule endpoint to another service, which may be
local or remote. A result may be returned from the flow and
passed back to the component using the return argument
of the method. This model is very similar to traditional RPC
calls.
 In the above example, the
component InvokerComponent has a field hello,
which is of typeHelloInterface, with getter and
setter methods for the field. The invoke method
will be called on the flow and calls
the hello.sayHello() method. This call will result
in another flow.
 The HelloInterface is very simple with a single
method sayHello.
 You can handle data conversion when making a
call and receiving a result using the normal
transformer configuration on the endpoint. In
the above example, assume the Web service
was expecting
an org.mule.examples.bindings.WebHelloRequ
est object and returned
an org.mule.examples.bindings.WebHelloResp
onse object. You don’t want your component to
know about these external data types, so you
can configure transformers to do the conversion
when the call is made as shown in next slide :
 If the remote flow triggers an exception of
fault, this exception will get serialized back to
the local flow call and thrown.
 If your service wants to handle this
exception, you must add the exception
(or java.lang.Exception) to the bound method
signature and use a try catch block as usual.
 The implementation for the component is
contained within the <script:script>element
as shown below :
 return "Total: " +
AdditionService.add(1,2)
ThankYou!!!!!!!!

More Related Content

What's hot

Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
Praneethchampion
 
Implementing an Esb using Mule
Implementing an Esb using MuleImplementing an Esb using Mule
Implementing an Esb using Mule
AbdulImrankhan7
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guide
Sindhu VL
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
Praneethchampion
 
Making flow Mule
Making flow MuleMaking flow Mule
Making flow Mule
Giuseppe Fiore
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patterns
Sindhu VL
 
How muleworks
How muleworksHow muleworks
How muleworks
Khadhar Koneti
 
Mule execution
Mule executionMule execution
Mule execution
D.Rajesh Kumar
 
mule real world
mule real worldmule real world
mule real world
Rajkattamuri
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
Mohammed246
 
Mule esb
Mule esbMule esb
Mule esb
charan teja R
 
Create Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESBCreate Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESB
Sanjeet Pandey
 
Using mule with web services
Using mule with web servicesUsing mule with web services
Using mule with web services
Shanky Gupta
 
VM example in mule
VM example in muleVM example in mule
VM example in mule
Anirban Sen Chowdhary
 
Implementing an ESB using Mule
Implementing an ESB using MuleImplementing an ESB using Mule
Implementing an ESB using Mule
elliando dias
 
A Short Introduction of Mule ESB
A Short Introduction of Mule ESBA Short Introduction of Mule ESB
A Short Introduction of Mule ESB
Swapnil Sahu
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
Khasim Cise
 
Mule execution
Mule executionMule execution
Mule execution
Praneethchampion
 

What's hot (18)

Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
 
Implementing an Esb using Mule
Implementing an Esb using MuleImplementing an Esb using Mule
Implementing an Esb using Mule
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guide
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Making flow Mule
Making flow MuleMaking flow Mule
Making flow Mule
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patterns
 
How muleworks
How muleworksHow muleworks
How muleworks
 
Mule execution
Mule executionMule execution
Mule execution
 
mule real world
mule real worldmule real world
mule real world
 
Web service vm in mule
Web service vm in muleWeb service vm in mule
Web service vm in mule
 
Mule esb
Mule esbMule esb
Mule esb
 
Create Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESBCreate Account in Salesforce using Mule ESB
Create Account in Salesforce using Mule ESB
 
Using mule with web services
Using mule with web servicesUsing mule with web services
Using mule with web services
 
VM example in mule
VM example in muleVM example in mule
VM example in mule
 
Implementing an ESB using Mule
Implementing an ESB using MuleImplementing an ESB using Mule
Implementing an ESB using Mule
 
A Short Introduction of Mule ESB
A Short Introduction of Mule ESBA Short Introduction of Mule ESB
A Short Introduction of Mule ESB
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
 
Mule execution
Mule executionMule execution
Mule execution
 

Viewers also liked

File types pro forma(1)
File types pro forma(1)File types pro forma(1)
File types pro forma(1)
Joe Young
 
Mule soa
Mule soaMule soa
Mule soa
Anand kalla
 
3.38 curta com amor iguatemi brasília
3.38 curta com amor   iguatemi brasília3.38 curta com amor   iguatemi brasília
3.38 curta com amor iguatemi brasília
Moringa
 
Abstract Book92-9-12
Abstract Book92-9-12Abstract Book92-9-12
Abstract Book92-9-12
Mohammad Safaie Yazdi
 
Kluwer
KluwerKluwer
Kluweringron
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
Anand kalla
 
Quartz in mule
Quartz in muleQuartz in mule
Quartz in mule
Son Nguyen
 
Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain support
Shanky Gupta
 
Overview of MUnit
Overview of MUnitOverview of MUnit
Overview of MUnit
Manik S Magar
 
Mule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutesMule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutes
Gennaro Spagnoli
 
Document in mule application
Document in mule applicationDocument in mule application
Document in mule application
Son Nguyen
 
Mule esb munit
Mule esb munitMule esb munit
Mule esb munit
D.Rajesh Kumar
 
Mule esb basics beginners
Mule esb basics beginnersMule esb basics beginners
Mule esb basics beginners
veena naresh
 
Mule esb basics
Mule esb basicsMule esb basics
Mule esb basics
Naresh Naidu
 
Mocking with salesforce using Munit
Mocking with salesforce using MunitMocking with salesforce using Munit
Mocking with salesforce using Munit
Son Nguyen
 
Java in Mule
Java in MuleJava in Mule
Java in Mule
Anand kalla
 
Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1
Anand kalla
 
ENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHOR
ENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHORENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHOR
ENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHOR
Media Education
 
Mule legacy modernization example
Mule legacy modernization exampleMule legacy modernization example
Mule legacy modernization example
D.Rajesh Kumar
 

Viewers also liked (19)

File types pro forma(1)
File types pro forma(1)File types pro forma(1)
File types pro forma(1)
 
Mule soa
Mule soaMule soa
Mule soa
 
3.38 curta com amor iguatemi brasília
3.38 curta com amor   iguatemi brasília3.38 curta com amor   iguatemi brasília
3.38 curta com amor iguatemi brasília
 
Abstract Book92-9-12
Abstract Book92-9-12Abstract Book92-9-12
Abstract Book92-9-12
 
Kluwer
KluwerKluwer
Kluwer
 
Mule database-connectors
Mule database-connectorsMule database-connectors
Mule database-connectors
 
Quartz in mule
Quartz in muleQuartz in mule
Quartz in mule
 
Mule: Munit domain support
Mule: Munit domain supportMule: Munit domain support
Mule: Munit domain support
 
Overview of MUnit
Overview of MUnitOverview of MUnit
Overview of MUnit
 
Mule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutesMule esb How to use Collection Splitter in 5 minutes
Mule esb How to use Collection Splitter in 5 minutes
 
Document in mule application
Document in mule applicationDocument in mule application
Document in mule application
 
Mule esb munit
Mule esb munitMule esb munit
Mule esb munit
 
Mule esb basics beginners
Mule esb basics beginnersMule esb basics beginners
Mule esb basics beginners
 
Mule esb basics
Mule esb basicsMule esb basics
Mule esb basics
 
Mocking with salesforce using Munit
Mocking with salesforce using MunitMocking with salesforce using Munit
Mocking with salesforce using Munit
 
Java in Mule
Java in MuleJava in Mule
Java in Mule
 
Unit testing using Munit Part 1
Unit testing using Munit Part 1Unit testing using Munit Part 1
Unit testing using Munit Part 1
 
ENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHOR
ENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHORENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHOR
ENTREGABILIDADE, QUE PALAVRÃO! DICAS SIMPLES PARA ENTREGAR MAIS E MELHOR
 
Mule legacy modernization example
Mule legacy modernization exampleMule legacy modernization example
Mule legacy modernization example
 

Similar to Bindings of components in mule

Component library
Component libraryComponent library
Component library
Jordi Llonch
 
DUTDIP - Don't Use This Dependency Injection
DUTDIP - Don't Use This Dependency InjectionDUTDIP - Don't Use This Dependency Injection
DUTDIP - Don't Use This Dependency Injection
Rushabh Dadbhawala
 
Java servlets
Java servletsJava servlets
Java servlets
yuvarani p
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
Naga Muruga
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
Mindfire Solutions
 
Lecture5
Lecture5Lecture5
Express node js
Express node jsExpress node js
Express node js
Yashprit Singh
 
PHP 7
PHP 7PHP 7
ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]
Mohamed Abdeen
 
How To Use IO Monads in Scala?
 How To Use IO Monads in Scala? How To Use IO Monads in Scala?
How To Use IO Monads in Scala?
Knoldus Inc.
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
nagarajupatangay
 
Sun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguideSun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguide
Alberto Romero Jiménez
 
An Introduction To Java Web Technology
An Introduction To Java Web TechnologyAn Introduction To Java Web Technology
An Introduction To Java Web Technology
vikram singh
 
Servlet
Servlet Servlet
Servlet
Dhara Joshi
 
Mule ESB
Mule ESBMule ESB
Mule ESB
Yura Nosenko
 
Servlets
ServletsServlets
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check Tuneup
Bala Subra
 
SCWCD : The servlet container : CHAP : 4
SCWCD : The servlet container : CHAP : 4SCWCD : The servlet container : CHAP : 4
SCWCD : The servlet container : CHAP : 4
Ben Abdallah Helmi
 
17612235.ppt
17612235.ppt17612235.ppt
17612235.ppt
yovixi5669
 
Mule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsMule ESB Interview or Certification questions
Mule ESB Interview or Certification questions
TechieVarsity
 

Similar to Bindings of components in mule (20)

Component library
Component libraryComponent library
Component library
 
DUTDIP - Don't Use This Dependency Injection
DUTDIP - Don't Use This Dependency InjectionDUTDIP - Don't Use This Dependency Injection
DUTDIP - Don't Use This Dependency Injection
 
Java servlets
Java servletsJava servlets
Java servlets
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Lecture5
Lecture5Lecture5
Lecture5
 
Express node js
Express node jsExpress node js
Express node js
 
PHP 7
PHP 7PHP 7
PHP 7
 
ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]
 
How To Use IO Monads in Scala?
 How To Use IO Monads in Scala? How To Use IO Monads in Scala?
How To Use IO Monads in Scala?
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Sun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguideSun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguide
 
An Introduction To Java Web Technology
An Introduction To Java Web TechnologyAn Introduction To Java Web Technology
An Introduction To Java Web Technology
 
Servlet
Servlet Servlet
Servlet
 
Mule ESB
Mule ESBMule ESB
Mule ESB
 
Servlets
ServletsServlets
Servlets
 
How to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check TuneupHow to ace your .NET technical interview :: .Net Technical Check Tuneup
How to ace your .NET technical interview :: .Net Technical Check Tuneup
 
SCWCD : The servlet container : CHAP : 4
SCWCD : The servlet container : CHAP : 4SCWCD : The servlet container : CHAP : 4
SCWCD : The servlet container : CHAP : 4
 
17612235.ppt
17612235.ppt17612235.ppt
17612235.ppt
 
Mule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsMule ESB Interview or Certification questions
Mule ESB Interview or Certification questions
 

Recently uploaded

NHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree TranscriptNHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree Transcript
lhtvqoag
 
Practical eLearning Makeovers for Everyone
Practical eLearning Makeovers for EveryonePractical eLearning Makeovers for Everyone
Practical eLearning Makeovers for Everyone
Bianca Woods
 
一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理
一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理
一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理
mfria419
 
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
i990go7o
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
tobbk6s8
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
ellemjani
 
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
stgq9v39
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
anthonylin333
 
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
kmzsy4kn
 
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
oabn3692
 
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
qa8dk1wm
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
881evgn0
 
一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理
一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理
一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理
t34zod9l
 
Getting Data Ready for Culture Hack by Neontribe
Getting Data Ready for Culture Hack by NeontribeGetting Data Ready for Culture Hack by Neontribe
Getting Data Ready for Culture Hack by Neontribe
Harry Harrold
 
Best Digital Marketing Strategy Build Your Online Presence 2024.pptx
Best Digital Marketing Strategy Build  Your Online Presence 2024.pptxBest Digital Marketing Strategy Build  Your Online Presence 2024.pptx
Best Digital Marketing Strategy Build Your Online Presence 2024.pptx
pavankumarpayexelsol
 
NHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHINHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHI
NishantRathi18
 
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
67n7f53
 
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptxTOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
BAWAALEX1
 
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
67n7f53
 
一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理
一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理
一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理
ka3y2ukz
 

Recently uploaded (20)

NHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree TranscriptNHL Stenden University of Applied Sciences Diploma Degree Transcript
NHL Stenden University of Applied Sciences Diploma Degree Transcript
 
Practical eLearning Makeovers for Everyone
Practical eLearning Makeovers for EveryonePractical eLearning Makeovers for Everyone
Practical eLearning Makeovers for Everyone
 
一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理
一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理
一比一原版(Teesside毕业证)英国提赛德大学毕业证如何办理
 
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
一比一原版(UW毕业证书)华盛顿大学毕业证如何办理
 
一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样一比一原版肯特大学毕业证UKC成绩单一模一样
一比一原版肯特大学毕业证UKC成绩单一模一样
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
 
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
一比一原版(CSUEB毕业证)美国加州州立大学东湾分校毕业证如何办理
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
 
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
一比一原版(KPU毕业证)加拿大昆特兰理工大学毕业证如何办理
 
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
一比一原版(Rice毕业证)美国莱斯大学毕业证如何办理
 
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
一比一原版澳洲查理斯特大学毕业证(CSU学位证)如何办理
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
 
一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理
一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理
一比一原版(UWS毕业证)澳洲西悉尼大学毕业证如何办理
 
Getting Data Ready for Culture Hack by Neontribe
Getting Data Ready for Culture Hack by NeontribeGetting Data Ready for Culture Hack by Neontribe
Getting Data Ready for Culture Hack by Neontribe
 
Best Digital Marketing Strategy Build Your Online Presence 2024.pptx
Best Digital Marketing Strategy Build  Your Online Presence 2024.pptxBest Digital Marketing Strategy Build  Your Online Presence 2024.pptx
Best Digital Marketing Strategy Build Your Online Presence 2024.pptx
 
NHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHINHR Engineers Portfolio 2023 2024 NISHANT RATHI
NHR Engineers Portfolio 2023 2024 NISHANT RATHI
 
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
 
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptxTOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
TOWER DESIGN PROCEDURE TOWER DESIGN BASIS .pptx
 
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
一比一原版(OU毕业证)美国俄克拉荷马大学毕业证如何办理
 
一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理
一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理
一比一原版(Brunel毕业证)英国布鲁内尔大学毕业证如何办理
 

Bindings of components in mule

  • 1.
  • 2.  Components can use bindings to call an external service during execution.  The bindings used with a Java component bind a Java interface, or single interface method, to an outbound endpoint.  The external service to be called should implement the same interface, and the component should encapsulate a reference to that interface, which is initialized during the bootstrap stage by the Mule configuration builder.  The reference will be initialized using a reflective proxy class.
  • 3.
  • 4.  With component bindings, you can configure multiple interfaces or a single interface with an endpoint bound to one or more Mule endpoints.  Mule currently supports component bindings for Java components (the default components in Mule) and script components, such as Groovy or JRuby. This page describes how to configure each.
  • 5.  Bindings can be used by components to call out to an external service.  The bound interface is added to the component as a field with the usual bean getter and setter methods. In the binding configuration for the component, you can bind this interface along with a method in the interface to a Mule endpoint.  When that method is called, the call parameters are sent over the Mule endpoint to another service, which may be local or remote. A result may be returned from the flow and passed back to the component using the return argument of the method. This model is very similar to traditional RPC calls.
  • 6.
  • 7.  In the above example, the component InvokerComponent has a field hello, which is of typeHelloInterface, with getter and setter methods for the field. The invoke method will be called on the flow and calls the hello.sayHello() method. This call will result in another flow.  The HelloInterface is very simple with a single method sayHello.
  • 8.
  • 9.  You can handle data conversion when making a call and receiving a result using the normal transformer configuration on the endpoint. In the above example, assume the Web service was expecting an org.mule.examples.bindings.WebHelloRequ est object and returned an org.mule.examples.bindings.WebHelloResp onse object. You don’t want your component to know about these external data types, so you can configure transformers to do the conversion when the call is made as shown in next slide :
  • 10.
  • 11.  If the remote flow triggers an exception of fault, this exception will get serialized back to the local flow call and thrown.  If your service wants to handle this exception, you must add the exception (or java.lang.Exception) to the bound method signature and use a try catch block as usual.
  • 12.
  • 13.  The implementation for the component is contained within the <script:script>element as shown below :  return "Total: " + AdditionService.add(1,2)