SlideShare a Scribd company logo
1 of 12
Web Service Invocation in Mule
This Tutorial explains how to consume a
webservice using mule Web Service Consumer.
Pre-requisites:
● Anypoint Studio
● Weather Web Service
In the below flow I am setting the city zip code as payload in
“Set Payload” Component.
DataMapper component maps this value to the Weather
Webservice Operation “GetCityForecastByZip” Request xml
Field as “ZIP”.
Webservice Consumer component calls the Weather Web
Service to fetch the “GetCityForecastByZipResponse”.
The Next DataMapper Transforms the XML to POJO Object
i.e. GetCityForecastByZipResponse (Used for testing purpose
only, Can be removed).
Finally GetCityForecastByZipResponse Java Object will be
transformed to JSON String and given as response to Http
Component.
Which gives the City Weather Information
Main Flow
Http Component Configuration
Set Payload Component
Configuration
DataMapper to prepare Web
Service Request
Web Service Consumer
Configuration
Web Service Configuration
DataMapper to Transform
Webservice Response to POJO
Configuration
Main Flow Source
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="Weather.wsdl"
service="Weather" port="WeatherSoap12"
serviceAddress="http://wsf.cdyne.com/WeatherWS/Weather.asmx" doc:name="Web
Service Consumer"/>
<!-- <mulexml:namespace-manager includeConfigNamespaces="true">
<mulexml:namespace prefix="wet" uri="http://ws.cdyne.com/WeatherWS/"/>
</mulexml:namespace-manager> -->
<configuration doc:name="Configuration">
<expression-language autoResolveVariables="true">
<import name="poc" class="com.poc.PocUtil"/>
<global-functions>
def changeState(){ return poc.changeState() }
</global-functions>
</expression-language>
</configuration>
<data-mapper:config name="JSON_To_Xml_GetCityWeatherByZIP_"
transformationGraphPath="json_to_xml_getcityweatherbyzip_.grf"
doc:name="JSON_To_Xml_GetCityWeatherByZIP_"/> <data-mapper:config
name="JSON_To_Xml_GetCityForecastByZIP_"
transformationGraphPath="json_to_xml_getcityforecastbyzip_.grf"
doc:name="JSON_To_Xml_GetCityForecastByZIP_"/>
<data-mapper:config name="Xml_GetCityForecastByZIPResponse__To_Pojo"
transformationGraphPath="xml_getcityforecastbyzipresponse__to_pojo.grf"
doc:name="Xml_GetCityForecastByZIPResponse__To_Pojo"/>
<flow name="webservicepocFlow2" doc:name="webservicepocFlow2">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost"
port="8082" doc:name="HTTP"/>
<set-payload value="{&quot;zipcode&quot;:&quot;00501&quot;}" doc:name="Set
Payload"/>
<data-mapper:transform config-ref="JSON_To_Xml_GetCityForecastByZIP_"
doc:name="JSON To Xml&lt;GetCityForecastByZIP&gt;"/>
<ws:consumer config-ref="Web_Service_Consumer" operation="GetCityForecastByZIP"
doc:name="Web Service Consumer"/>
<data-mapper:transform config-ref="Xml_GetCityForecastByZIPResponse__To_Pojo"
doc:name="Xml&lt;GetCityForecastByZIPResponse&gt; To Pojo">
<data-mapper:input-arguments>
</data-mapper:input-arguments>
</data-mapper:transform>
<logger message="#[payload.getCity()]" level="INFO" doc:name="Logger"/>
<json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>

More Related Content

What's hot

Mule Microsoft Dynamics AX 2012 Connector
Mule Microsoft Dynamics AX 2012 ConnectorMule Microsoft Dynamics AX 2012 Connector
Mule Microsoft Dynamics AX 2012 ConnectorAnkush Sharma
 
ESB Online Training Part 2
ESB Online Training Part 2ESB Online Training Part 2
ESB Online Training Part 2Vince Soliza
 
Enjoy Munit with Mule
Enjoy Munit with MuleEnjoy Munit with Mule
Enjoy Munit with MuleBui Kiet
 
Mulesoft Anypoint platform introduction
Mulesoft Anypoint platform introductionMulesoft Anypoint platform introduction
Mulesoft Anypoint platform introductiongijish
 
Mule Concur Connector
Mule Concur ConnectorMule Concur Connector
Mule Concur ConnectorAnkush Sharma
 
Mule components
Mule componentsMule components
Mule componentsKrishna_in
 
Mule and web services
Mule and web servicesMule and web services
Mule and web servicesManav Prasad
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demoSudha Ch
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Servicesecosio GmbH
 
Mule agent architecture
Mule agent architectureMule agent architecture
Mule agent architectureKrishna_in
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSCarol McDonald
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WSIndicThreads
 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule EsbAnand kalla
 
Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Peter R. Egli
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in MuleShahid Shaik
 
WebService-Java
WebService-JavaWebService-Java
WebService-Javahalwal
 
Messaging with Spring Integration
Messaging with Spring IntegrationMessaging with Spring Integration
Messaging with Spring IntegrationVadim Mikhnevych
 

What's hot (20)

Mule Microsoft Dynamics AX 2012 Connector
Mule Microsoft Dynamics AX 2012 ConnectorMule Microsoft Dynamics AX 2012 Connector
Mule Microsoft Dynamics AX 2012 Connector
 
ESB Online Training Part 2
ESB Online Training Part 2ESB Online Training Part 2
ESB Online Training Part 2
 
Enjoy Munit with Mule
Enjoy Munit with MuleEnjoy Munit with Mule
Enjoy Munit with Mule
 
Mulesoft Anypoint platform introduction
Mulesoft Anypoint platform introductionMulesoft Anypoint platform introduction
Mulesoft Anypoint platform introduction
 
Mule Concur Connector
Mule Concur ConnectorMule Concur Connector
Mule Concur Connector
 
Mule components
Mule componentsMule components
Mule components
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
 
Introduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web ServicesIntroduction to SOAP/WSDL Web Services and RESTful Web Services
Introduction to SOAP/WSDL Web Services and RESTful Web Services
 
Java mule
Java muleJava mule
Java mule
 
Mule agent architecture
Mule agent architectureMule agent architecture
Mule agent architecture
 
Interoperable Web Services with JAX-WS
Interoperable Web Services with JAX-WSInteroperable Web Services with JAX-WS
Interoperable Web Services with JAX-WS
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
 
Spring integration
Spring integrationSpring integration
Spring integration
 
SOAP Service in Mule Esb
SOAP Service in Mule EsbSOAP Service in Mule Esb
SOAP Service in Mule Esb
 
Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)Java API for XML Web Services (JAX-WS)
Java API for XML Web Services (JAX-WS)
 
Maven introduction in Mule
Maven introduction in MuleMaven introduction in Mule
Maven introduction in Mule
 
WebService-Java
WebService-JavaWebService-Java
WebService-Java
 
Messaging with Spring Integration
Messaging with Spring IntegrationMessaging with Spring Integration
Messaging with Spring Integration
 
Spring MVC Basics
Spring MVC BasicsSpring MVC Basics
Spring MVC Basics
 

Viewers also liked

Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mqKhan625
 
How to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceHow to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceSon Nguyen
 
Ford car on the cloud
Ford car on the cloudFord car on the cloud
Ford car on the cloudBala Iyer
 
Calcio. Registrazione del lavoro di allenamento e della partita
Calcio. Registrazione del lavoro di allenamento e della partitaCalcio. Registrazione del lavoro di allenamento e della partita
Calcio. Registrazione del lavoro di allenamento e della partitaCalzetti & Mariucci Editori
 
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIERHANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIERvineet raj
 
Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?
Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?
Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?ozpar
 
L05 language model_part2
L05 language model_part2L05 language model_part2
L05 language model_part2ananth
 
Projekt Edukacja bez granic
Projekt Edukacja bez granicProjekt Edukacja bez granic
Projekt Edukacja bez graniczso7
 
Machine Learning Lecture 2 Basics
Machine Learning Lecture 2 BasicsMachine Learning Lecture 2 Basics
Machine Learning Lecture 2 Basicsananth
 
GIS Services development using CloudEO platform data and Tools
GIS Services development using CloudEO platform data and ToolsGIS Services development using CloudEO platform data and Tools
GIS Services development using CloudEO platform data and ToolsDavid Eliseo Martinez Castellanos
 

Viewers also liked (14)

Primer parcial dfso
Primer parcial dfsoPrimer parcial dfso
Primer parcial dfso
 
Mule with rabbit mq
Mule with rabbit mqMule with rabbit mq
Mule with rabbit mq
 
How to – rest api proxy to soap webservice
How to – rest api proxy to soap webserviceHow to – rest api proxy to soap webservice
How to – rest api proxy to soap webservice
 
Seleccionados SOLF nº16 (Xuño 2016)
Seleccionados SOLF nº16 (Xuño 2016)Seleccionados SOLF nº16 (Xuño 2016)
Seleccionados SOLF nº16 (Xuño 2016)
 
Boletín de novidades. Sección infantil-xuvenil. Setembro-outubro 2016
Boletín de novidades. Sección infantil-xuvenil. Setembro-outubro 2016Boletín de novidades. Sección infantil-xuvenil. Setembro-outubro 2016
Boletín de novidades. Sección infantil-xuvenil. Setembro-outubro 2016
 
Ford car on the cloud
Ford car on the cloudFord car on the cloud
Ford car on the cloud
 
CES 2017 Show Floor Maps
CES 2017 Show Floor MapsCES 2017 Show Floor Maps
CES 2017 Show Floor Maps
 
Calcio. Registrazione del lavoro di allenamento e della partita
Calcio. Registrazione del lavoro di allenamento e della partitaCalcio. Registrazione del lavoro di allenamento e della partita
Calcio. Registrazione del lavoro di allenamento e della partita
 
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIERHANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
 
Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?
Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?
Does Pronunciation Instruction Promote Intelligibility and Comprehensibility?
 
L05 language model_part2
L05 language model_part2L05 language model_part2
L05 language model_part2
 
Projekt Edukacja bez granic
Projekt Edukacja bez granicProjekt Edukacja bez granic
Projekt Edukacja bez granic
 
Machine Learning Lecture 2 Basics
Machine Learning Lecture 2 BasicsMachine Learning Lecture 2 Basics
Machine Learning Lecture 2 Basics
 
GIS Services development using CloudEO platform data and Tools
GIS Services development using CloudEO platform data and ToolsGIS Services development using CloudEO platform data and Tools
GIS Services development using CloudEO platform data and Tools
 

Similar to Web service invocation in mule

Web service invocation in mule
Web service invocation in muleWeb service invocation in mule
Web service invocation in muleKrishnakanth Goud
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoasZeid Hassan
 
Workshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSWorkshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSVisual Engineering
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3Rob Tweed
 
Ph d defense_Department of Information Technology, Uppsala University, Sweden
Ph d defense_Department of Information Technology, Uppsala University, SwedenPh d defense_Department of Information Technology, Uppsala University, Sweden
Ph d defense_Department of Information Technology, Uppsala University, SwedenSabesan Manivasakan
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 seriesopenbala
 
Real Time Connected Vehicle Networking with HDInsight and Apache Storm
Real Time Connected Vehicle Networking with HDInsight and Apache StormReal Time Connected Vehicle Networking with HDInsight and Apache Storm
Real Time Connected Vehicle Networking with HDInsight and Apache StormOur Community Exchange LLC
 
Getting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamGetting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamSteve Lee
 
Murach : How to work with session state and cookies
Murach : How to work with session state and cookiesMurach : How to work with session state and cookies
Murach : How to work with session state and cookiesMahmoudOHassouna
 
Entity Manager
Entity ManagerEntity Manager
Entity Managerpatinijava
 
Sessionizing Uber Trips in Realtime - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime  - Flink Forward '18, BerlinSessionizing Uber Trips in Realtime  - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime - Flink Forward '18, BerlinAmey Chaugule
 
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...Flink Forward
 
From mvc to redux: 停看聽
From mvc to redux: 停看聽From mvc to redux: 停看聽
From mvc to redux: 停看聽Jeff Lin
 
Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and SymfonyIgnacio Martín
 
Push to the limit - rich and pro-active user interfaces with ADF (Oracle Ope...
Push to the limit - rich and pro-active user interfaces with ADF  (Oracle Ope...Push to the limit - rich and pro-active user interfaces with ADF  (Oracle Ope...
Push to the limit - rich and pro-active user interfaces with ADF (Oracle Ope...Lucas Jellema
 

Similar to Web service invocation in mule (20)

Web service invocation in mule
Web service invocation in muleWeb service invocation in mule
Web service invocation in mule
 
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
 
Workshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJSWorkshop 27: Isomorphic web apps with ReactJS
Workshop 27: Isomorphic web apps with ReactJS
 
Intro react js
Intro react jsIntro react js
Intro react js
 
CITYSEARCH
CITYSEARCHCITYSEARCH
CITYSEARCH
 
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
EWD 3 Training Course Part 39: Building a React.js application with QEWD, Part 3
 
70562-Dumps
70562-Dumps70562-Dumps
70562-Dumps
 
Ph d defense_Department of Information Technology, Uppsala University, Sweden
Ph d defense_Department of Information Technology, Uppsala University, SwedenPh d defense_Department of Information Technology, Uppsala University, Sweden
Ph d defense_Department of Information Technology, Uppsala University, Sweden
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 series
 
Real Time Connected Vehicle Networking with HDInsight and Apache Storm
Real Time Connected Vehicle Networking with HDInsight and Apache StormReal Time Connected Vehicle Networking with HDInsight and Apache Storm
Real Time Connected Vehicle Networking with HDInsight and Apache Storm
 
Getting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstreamGetting Reactive with Cycle.js and xstream
Getting Reactive with Cycle.js and xstream
 
Murach : How to work with session state and cookies
Murach : How to work with session state and cookiesMurach : How to work with session state and cookies
Murach : How to work with session state and cookies
 
Entity Manager
Entity ManagerEntity Manager
Entity Manager
 
Ejb6
Ejb6Ejb6
Ejb6
 
Sessionizing Uber Trips in Realtime - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime  - Flink Forward '18, BerlinSessionizing Uber Trips in Realtime  - Flink Forward '18, Berlin
Sessionizing Uber Trips in Realtime - Flink Forward '18, Berlin
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
Flink Forward Berlin 2018: Amey Chaugule - "Threading Needles in a Haystack: ...
 
From mvc to redux: 停看聽
From mvc to redux: 停看聽From mvc to redux: 停看聽
From mvc to redux: 停看聽
 
Server side rendering with React and Symfony
Server side rendering with React and SymfonyServer side rendering with React and Symfony
Server side rendering with React and Symfony
 
Push to the limit - rich and pro-active user interfaces with ADF (Oracle Ope...
Push to the limit - rich and pro-active user interfaces with ADF  (Oracle Ope...Push to the limit - rich and pro-active user interfaces with ADF  (Oracle Ope...
Push to the limit - rich and pro-active user interfaces with ADF (Oracle Ope...
 

More from AnilKumar Etagowni

Mule esb data weave multi input data
Mule esb data weave multi input dataMule esb data weave multi input data
Mule esb data weave multi input dataAnilKumar Etagowni
 
Mule ESB SMTP Connector Integration
Mule ESB SMTP Connector  IntegrationMule ESB SMTP Connector  Integration
Mule ESB SMTP Connector IntegrationAnilKumar Etagowni
 
Box connector Mule ESB Integration
Box connector Mule ESB IntegrationBox connector Mule ESB Integration
Box connector Mule ESB IntegrationAnilKumar Etagowni
 
Dropbox connector Mule ESB Integration
Dropbox connector Mule ESB IntegrationDropbox connector Mule ESB Integration
Dropbox connector Mule ESB IntegrationAnilKumar Etagowni
 
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 muleAnilKumar Etagowni
 
Fetch records from mysql using mule esb
Fetch records from mysql using mule esbFetch records from mysql using mule esb
Fetch records from mysql using mule esbAnilKumar Etagowni
 

More from AnilKumar Etagowni (9)

Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Mule ESB : ssh connector
Mule ESB : ssh connectorMule ESB : ssh connector
Mule ESB : ssh connector
 
Mule esb data weave multi input data
Mule esb data weave multi input dataMule esb data weave multi input data
Mule esb data weave multi input data
 
Mule esb :Data Weave
Mule esb :Data WeaveMule esb :Data Weave
Mule esb :Data Weave
 
Mule ESB SMTP Connector Integration
Mule ESB SMTP Connector  IntegrationMule ESB SMTP Connector  Integration
Mule ESB SMTP Connector Integration
 
Box connector Mule ESB Integration
Box connector Mule ESB IntegrationBox connector Mule ESB Integration
Box connector Mule ESB Integration
 
Dropbox connector Mule ESB Integration
Dropbox connector Mule ESB IntegrationDropbox connector Mule ESB Integration
Dropbox connector Mule ESB Integration
 
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
 
Fetch records from mysql using mule esb
Fetch records from mysql using mule esbFetch records from mysql using mule esb
Fetch records from mysql using mule esb
 

Recently uploaded

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

Web service invocation in mule

  • 1. Web Service Invocation in Mule This Tutorial explains how to consume a webservice using mule Web Service Consumer. Pre-requisites: ● Anypoint Studio ● Weather Web Service
  • 2. In the below flow I am setting the city zip code as payload in “Set Payload” Component. DataMapper component maps this value to the Weather Webservice Operation “GetCityForecastByZip” Request xml Field as “ZIP”. Webservice Consumer component calls the Weather Web Service to fetch the “GetCityForecastByZipResponse”. The Next DataMapper Transforms the XML to POJO Object i.e. GetCityForecastByZipResponse (Used for testing purpose only, Can be removed). Finally GetCityForecastByZipResponse Java Object will be transformed to JSON String and given as response to Http Component. Which gives the City Weather Information
  • 6. DataMapper to prepare Web Service Request
  • 9. DataMapper to Transform Webservice Response to POJO Configuration
  • 10.
  • 11. Main Flow Source <ws:consumer-config name="Web_Service_Consumer" wsdlLocation="Weather.wsdl" service="Weather" port="WeatherSoap12" serviceAddress="http://wsf.cdyne.com/WeatherWS/Weather.asmx" doc:name="Web Service Consumer"/> <!-- <mulexml:namespace-manager includeConfigNamespaces="true"> <mulexml:namespace prefix="wet" uri="http://ws.cdyne.com/WeatherWS/"/> </mulexml:namespace-manager> --> <configuration doc:name="Configuration"> <expression-language autoResolveVariables="true"> <import name="poc" class="com.poc.PocUtil"/> <global-functions> def changeState(){ return poc.changeState() } </global-functions> </expression-language> </configuration> <data-mapper:config name="JSON_To_Xml_GetCityWeatherByZIP_" transformationGraphPath="json_to_xml_getcityweatherbyzip_.grf" doc:name="JSON_To_Xml_GetCityWeatherByZIP_"/> <data-mapper:config name="JSON_To_Xml_GetCityForecastByZIP_" transformationGraphPath="json_to_xml_getcityforecastbyzip_.grf" doc:name="JSON_To_Xml_GetCityForecastByZIP_"/>
  • 12. <data-mapper:config name="Xml_GetCityForecastByZIPResponse__To_Pojo" transformationGraphPath="xml_getcityforecastbyzipresponse__to_pojo.grf" doc:name="Xml_GetCityForecastByZIPResponse__To_Pojo"/> <flow name="webservicepocFlow2" doc:name="webservicepocFlow2"> <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8082" doc:name="HTTP"/> <set-payload value="{&quot;zipcode&quot;:&quot;00501&quot;}" doc:name="Set Payload"/> <data-mapper:transform config-ref="JSON_To_Xml_GetCityForecastByZIP_" doc:name="JSON To Xml&lt;GetCityForecastByZIP&gt;"/> <ws:consumer config-ref="Web_Service_Consumer" operation="GetCityForecastByZIP" doc:name="Web Service Consumer"/> <data-mapper:transform config-ref="Xml_GetCityForecastByZIPResponse__To_Pojo" doc:name="Xml&lt;GetCityForecastByZIPResponse&gt; To Pojo"> <data-mapper:input-arguments> </data-mapper:input-arguments> </data-mapper:transform> <logger message="#[payload.getCity()]" level="INFO" doc:name="Logger"/> <json:object-to-json-transformer doc:name="Object to JSON"/> </flow>