SlideShare a Scribd company logo
1 of 14
 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

Expression language
Expression languageExpression language
Expression languageSon Nguyen
 
Mule any point studio
Mule any point studioMule any point studio
Mule any point studioSon Nguyen
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esbKhasim Cise
 
Design flows in mule
Design flows in muleDesign flows in mule
Design flows in muleSindhu VL
 
Quartz connector mule
Quartz connector   muleQuartz connector   mule
Quartz connector muleSindhu VL
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in MuleMohammed246
 
Testing mule
Testing   muleTesting   mule
Testing muleSindhu VL
 
Mule Custom Aggregator
Mule Custom AggregatorMule Custom Aggregator
Mule Custom AggregatorAnkush Sharma
 
File connector mule
File connector   muleFile connector   mule
File connector muleSindhu VL
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introductionSon Nguyen
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mulejaveed_mhd
 
Mule Collection Splitter
Mule Collection SplitterMule Collection Splitter
Mule Collection SplitterAnkush Sharma
 
Mule messages and transformers
Mule messages and transformersMule messages and transformers
Mule messages and transformersNaresh Naidu
 
Mule system properties
Mule system propertiesMule system properties
Mule system propertiesGandham38
 
Message structure
Message structureMessage structure
Message structureSon Nguyen
 

What's hot (20)

Expression language
Expression languageExpression language
Expression language
 
Mule any point studio
Mule any point studioMule any point studio
Mule any point studio
 
Mule esb usecase
Mule esb usecaseMule esb usecase
Mule esb usecase
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esb
 
Design flows in mule
Design flows in muleDesign flows in mule
Design flows in mule
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
Quartz connector mule
Quartz connector   muleQuartz connector   mule
Quartz connector mule
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in Mule
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Testing mule
Testing   muleTesting   mule
Testing mule
 
Mule Custom Aggregator
Mule Custom AggregatorMule Custom Aggregator
Mule Custom Aggregator
 
File connector mule
File connector   muleFile connector   mule
File connector mule
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Mule Collection Splitter
Mule Collection SplitterMule Collection Splitter
Mule Collection Splitter
 
Mule rabbit mq
Mule rabbit mqMule rabbit mq
Mule rabbit mq
 
Mule messages and transformers
Mule messages and transformersMule messages and transformers
Mule messages and transformers
 
Mule system properties
Mule system propertiesMule system properties
Mule system properties
 
Mule batch processing
Mule batch processingMule batch processing
Mule batch processing
 
Message structure
Message structureMessage structure
Message structure
 

Viewers also liked

Service orchestration by using flows
Service orchestration by using flowsService orchestration by using flows
Service orchestration by using flowsSindhu VL
 
Configuration patterns in mule
Configuration patterns in muleConfiguration patterns in mule
Configuration patterns in muleSindhu VL
 
Enterprise service bus mule
Enterprise service bus  muleEnterprise service bus  mule
Enterprise service bus muleSindhu VL
 
Mule for beginners
Mule for beginnersMule for beginners
Mule for beginnersSindhu VL
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor componentSindhu VL
 
Mule esb parts
Mule esb partsMule esb parts
Mule esb partsSindhu VL
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with muleSindhu VL
 
Mule debugging
Mule   debuggingMule   debugging
Mule debuggingSindhu VL
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestrationSindhu VL
 
Content based routing tutorial in mule
Content based routing tutorial in muleContent based routing tutorial in mule
Content based routing tutorial in muleSindhu VL
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core conceptsSindhu VL
 
Mule requester
Mule requesterMule requester
Mule requesterSindhu VL
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentalsSindhu VL
 
Xslt elements
Xslt elementsXslt elements
Xslt elementsSindhu VL
 
Groovy component
Groovy componentGroovy component
Groovy componentSindhu VL
 
Mule concepts
Mule conceptsMule concepts
Mule conceptsSindhu VL
 
Mule testing
Mule   testingMule   testing
Mule testingSindhu VL
 

Viewers also liked (20)

Service orchestration by using flows
Service orchestration by using flowsService orchestration by using flows
Service orchestration by using flows
 
Configuration patterns in mule
Configuration patterns in muleConfiguration patterns in mule
Configuration patterns in mule
 
Enterprise service bus mule
Enterprise service bus  muleEnterprise service bus  mule
Enterprise service bus mule
 
Mule for beginners
Mule for beginnersMule for beginners
Mule for beginners
 
Mule requestor component
Mule requestor componentMule requestor component
Mule requestor component
 
Mule esb
Mule esbMule esb
Mule esb
 
Munit
MunitMunit
Munit
 
Mule esb parts
Mule esb partsMule esb parts
Mule esb parts
 
Using maven with mule
Using maven with muleUsing maven with mule
Using maven with mule
 
Mule debugging
Mule   debuggingMule   debugging
Mule debugging
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestration
 
Content based routing tutorial in mule
Content based routing tutorial in muleContent based routing tutorial in mule
Content based routing tutorial in mule
 
Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Mule requester
Mule requesterMule requester
Mule requester
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
 
Xslt elements
Xslt elementsXslt elements
Xslt elements
 
Xslt mule
Xslt   muleXslt   mule
Xslt mule
 
Groovy component
Groovy componentGroovy component
Groovy component
 
Mule concepts
Mule conceptsMule concepts
Mule concepts
 
Mule testing
Mule   testingMule   testing
Mule testing
 

Similar to Configure Component Bindings to Call External Services

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 InjectionRushabh Dadbhawala
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Mindfire Solutions
 
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.
 
Sun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguideSun certifiedwebcomponentdeveloperstudyguide
Sun certifiedwebcomponentdeveloperstudyguideAlberto 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 Technologyvikram singh
 
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 TuneupBala Subra
 
SCWCD : The servlet container : CHAP : 4
SCWCD : The servlet container : CHAP : 4SCWCD : The servlet container : CHAP : 4
SCWCD : The servlet container : CHAP : 4Ben Abdallah Helmi
 
Mule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsMule ESB Interview or Certification questions
Mule ESB Interview or Certification questionsTechieVarsity
 

Similar to Configure Component Bindings to Call External Services (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
 

More from Sindhu VL

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling Sindhu VL
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guideSindhu VL
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - muleSindhu VL
 
Error handling with respect to mule
Error handling with respect to muleError handling with respect to mule
Error handling with respect to muleSindhu VL
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in muleSindhu VL
 
Basics of mule for beginners
Basics of mule for beginnersBasics of mule for beginners
Basics of mule for beginnersSindhu VL
 
Mule securing
Mule   securingMule   securing
Mule securingSindhu VL
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patternsSindhu VL
 
Encrption in mule
Encrption in muleEncrption in mule
Encrption in muleSindhu VL
 
Concepts in mule
Concepts in muleConcepts in mule
Concepts in muleSindhu VL
 
Working of mule
Working of muleWorking of mule
Working of muleSindhu VL
 
Mule esb for beginners
Mule esb for beginnersMule esb for beginners
Mule esb for beginnersSindhu VL
 
Flows in mule
Flows in muleFlows in mule
Flows in muleSindhu VL
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in muleSindhu VL
 
Flows and subflows in mule
Flows and subflows in muleFlows and subflows in mule
Flows and subflows in muleSindhu VL
 
Choice router mule
Choice router   muleChoice router   mule
Choice router muleSindhu VL
 

More from Sindhu VL (17)

Mule - error handling
Mule - error handling Mule - error handling
Mule - error handling
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guide
 
Core concepts - mule
Core concepts - muleCore concepts - mule
Core concepts - mule
 
Error handling with respect to mule
Error handling with respect to muleError handling with respect to mule
Error handling with respect to mule
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
 
Basics of mule for beginners
Basics of mule for beginnersBasics of mule for beginners
Basics of mule for beginners
 
Mule securing
Mule   securingMule   securing
Mule securing
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patterns
 
Encrption in mule
Encrption in muleEncrption in mule
Encrption in mule
 
Concepts in mule
Concepts in muleConcepts in mule
Concepts in mule
 
Mule errors
Mule errorsMule errors
Mule errors
 
Working of mule
Working of muleWorking of mule
Working of mule
 
Mule esb for beginners
Mule esb for beginnersMule esb for beginners
Mule esb for beginners
 
Flows in mule
Flows in muleFlows in mule
Flows in mule
 
Connectors in mule
Connectors in muleConnectors in mule
Connectors in mule
 
Flows and subflows in mule
Flows and subflows in muleFlows and subflows in mule
Flows and subflows in mule
 
Choice router mule
Choice router   muleChoice router   mule
Choice router mule
 

Recently uploaded

Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk GurgaonCheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk GurgaonDelhi Call girls
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfParomita Roy
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...home
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiSuhani Kapoor
 
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai DouxDubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Douxkojalkojal131
 
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130Suhani Kapoor
 
How to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our SiteHow to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our Sitegalleryaagency
 
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130Suhani Kapoor
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpmainac1
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...Call Girls in Nagpur High Profile
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxmirandajeremy200221
 
Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...Narsimha murthy
 
3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdfSwaraliBorhade
 
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightCheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightDelhi Call girls
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Delhi Call girls
 
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk GurgaonCheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
 
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdfChapter 19_DDA_TOD Policy_First Draft 2012.pdf
Chapter 19_DDA_TOD Policy_First Draft 2012.pdf
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
 
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service BhiwandiVIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
VIP Call Girls Bhiwandi Ananya 8250192130 Independent Escort Service Bhiwandi
 
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
young call girls in Pandav nagar 🔝 9953056974 🔝 Delhi escort Service
 
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai DouxDubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
Dubai Call Girls Pro Domain O525547819 Call Girls Dubai Doux
 
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
VIP Call Girls Service Mehdipatnam Hyderabad Call +91-8250192130
 
How to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our SiteHow to Be Famous in your Field just visit our Site
How to Be Famous in your Field just visit our Site
 
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
VIP Call Girls Service Kukatpally Hyderabad Call +91-8250192130
 
Kindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUpKindergarten Assessment Questions Via LessonUp
Kindergarten Assessment Questions Via LessonUp
 
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service AmravatiVIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
VIP Call Girl Amravati Aashi 8250192130 Independent Escort Service Amravati
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
 
DragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptxDragonBall PowerPoint Template for demo.pptx
DragonBall PowerPoint Template for demo.pptx
 
Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...Revit Understanding Reference Planes and Reference lines in Revit for Family ...
Revit Understanding Reference Planes and Reference lines in Revit for Family ...
 
3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf3D Printing And Designing Final Report.pdf
3D Printing And Designing Final Report.pdf
 
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
Call Girls In Safdarjung Enclave 24/7✡️9711147426✡️ Escorts Service
 
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 nightCheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
Cheap Rate Call girls Malviya Nagar 9205541914 shot 1500 night
 
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Mukherjee Nagar @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
 
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Okhla Delhi 💯Call Us 🔝8264348440🔝
 

Configure Component Bindings to Call External Services

  • 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)