SlideShare a Scribd company logo
1 of 20
Consuming RESTful web
services
l All contents Copyright © 2015, MuleSoftInc.
1 l All contents Copyright © 2015, MuleSoftInc.
Consuming RESTful web services
opyright © 2015, MuleSoft Inc.
• First check and see if there is an existing Anypoint
Connector to connect to the service provider
• If there is not, use the HTTP Request connector
- For the connector
∙ Specify host, port, and optionally, a base path
- For the endpoint
∙ Specify path and method
2 l All contentsC
• Create a second flow and rename flows
• Add an HTTP Listener connector endpoint to receive requests
at http://localhost:8081/united
• Add an HTTP Request connector endpoint to consume a
RESTful web service for United flight data
Walkthrough 3-1: Consume a RESTful web service
contents Copyright © 2015, MuleSoftInc.3 l All
Passing data to a RESTful web service
• For an HTTP Request endpoint, you can add parameters
- URI parameters
- Query parameters
- Headers
• Send form parameters with a request by setting
them in the payload
• Include attachments by adding an Attachment
transformer to your flow
4 l All contents Copyright © 2015, MuleSoftInc.
• Modify the HTTP Request connector endpoint to use a URI
parameter for the destination
• Set the destination to a static value
• Set the destination to a dynamic query parameter value
• Create a variable to set the destination
Walkthrough 3-2: Pass arguments to a RESTful web
service
5 l All contents Copyright © 2015, MuleSoft Inc.1
Introducing RAML
l All contents Copyright © 2015, MuleSoftInc.
6 l All contents Copyright © 2015, MuleSoftInc.
Approaches to API design
HAND CODING
• Time-consuming
• Maintenance nightmare
• Difficult to read/ consume
• Disconnected from
consumer
SWAGGER
• Verbose
• Primarily for doc
generation
• Limited reuse
• JSON based
BLUEPRINT
• Markdown
• Design focused
• Limited reuse
• Tooling is
proprietary
RAML
• Simple and succinct
• Intuitive
• Open, non-proprietary
• Based on standards
7 l All contents Copyright © 2015, MuleSoftInc.
RAML: RESTful API Modeling Language
• A simple and succinct way of
describing RESTful APIs
- Resources, schema, parameters, responses, and more
• Developed to help out the current API ecosystem
- Encourages reuse, enables discovery and pattern-sharing,
and aims for merit-based emergence of best practices
• A non-proprietary, vendor-neutral open spec
• Built on broadly-used standards such as YAML and JSON
- YAMLA’int a Markup Language
∙A human-readable data serialization format where data
structure hierarchy is maintained by outline indentation
• http://raml.org
18
8 l All contents Copyright © 2015, MuleSoftInc.
RAML example
19 l All contents Copyright © 2015, MuleSoft Inc.
19
Consuming RESTful web
services with RAML
definitions
l All contents Copyright © 2015, MuleSoftInc.
20 l All contents Copyright © 2015, MuleSoftInc.
Consuming RESTful web services with RAML definitions
• A RAML location (local file or external URI) can be
specified for an HTTP Request connector
• After you specify a RAML location
- All of the other fields will be automatically populated based
on what's specified in the RAML
ight © 2015, MuleSoftInc.21 l All contentsCopyr
RAML metadata
• The RAML metadata
- Will be obtained every time you open the project in Studio
- Kept in cache until you close the project
- Can be refreshed /reloaded if the RAML changes
• Is used by Studio to offer intelligent suggestions
ts Copyright © 2015, MuleSoftInc.
22 l All conten
• Add a third flow to the application
• Add an endpoint to receive requests at http://localhost:8081/bank
• Add an HTTP Request endpoint to consume a RESTful web
service defined with a RAML file
Walkthrough 3-3: Consume a RESTful web service that
has a RAML definition
l contents Copyright © 2015, MuleSoftInc.
23 l Al
Consuming SOAP web services
l All contents Copyright © 2015, MuleSoftInc.
24 l All contents Copyright © 2015, MuleSoftInc.
Apache CXF
• Mule’s SOAP support is based on Apache CXF
- A web services framework in Java for SOAP messaging
- Handles all serialization and deserialization
- Handles all SOAP envelope and namespace processing
- Developer sees only POJOs, etc. - not SOAP XML
25l All contents Copyright © 2015, MuleSoftInc.
Consuming SOAP web services
• First check and see if there is an existing Anypoint
Connector to connect to the service provider
• If there is not, use the Web Service Consumer connector
- Provide the location of the WSDL
- The rest will be configured for you: host, port,
address, available operations
• If you need more features, use the CXF component
- Also used to expose an endpoint as a SOAP service
26 l All contents Copyright © 2015, MuleSoftInc.
• Create a fourth flow with an endpoint to receive requests at
http://localhost:8081/delta
• Add a Web Service Consumer connector to consume a SOAP
web service for Delta flight data
• Use the DOM to XML transformer to display the SOAP
response
Walkthrough 3-4: Consume a SOAP Web Service
nts Copyright © 2015, MuleSoftInc.
17 l All conte
• Using the Web Service Consumer
- Use DataWeave (or the DataMapper transformer) to add
and map an input argument
∙ You will do this in module 5
Passing data to a SOAP web service
18 l All contents Copyright © 2015, MuleSoftInc.
Summary
l All contents Copyright © 2015, MuleSoftInc.
19 l All contents Copyright © 2015, MuleSoftInc.
Summary
• In this module, you learned to consume web services
• Use the Web Consumer connector to consume SOAP web
services
• Use the HTTP Request connector to consume REST web
services
- With or without URI parameters and query parameters
- With or without a RAML definition
• RAML is the Restful API Modeling Language
- A simple, succinct, open-spec standard based way to
describe RESTfulAPIs
20 l All contents Copyright © 2015, MuleSoftInc.

More Related Content

What's hot

Deploying mule applications
Deploying mule applicationsDeploying mule applications
Deploying mule applicationsBhargav Ranjit
 
Enterprise resources and mule
Enterprise resources and muleEnterprise resources and mule
Enterprise resources and muleD.Rajesh Kumar
 
Mule Fundamentals
Mule FundamentalsMule Fundamentals
Mule FundamentalsKhasim Cise
 
Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Harish Kumar
 
MuleSoft certified platform architect-level 1 Real Exam Questions
MuleSoft certified platform architect-level 1 Real Exam QuestionsMuleSoft certified platform architect-level 1 Real Exam Questions
MuleSoft certified platform architect-level 1 Real Exam Questionsdouglascarnicelli
 
Development using anypointstudio
Development using anypointstudioDevelopment using anypointstudio
Development using anypointstudiohimajareddys
 
Get Queue List from Microsoft Azure using Mule ESB
Get Queue List from Microsoft Azure using Mule ESBGet Queue List from Microsoft Azure using Mule ESB
Get Queue List from Microsoft Azure using Mule ESBSanjeet Pandey
 
Mule sap connector
Mule sap connectorMule sap connector
Mule sap connectorSon Nguyen
 
Deep Dive into Salesforce APIs
Deep Dive into Salesforce APIsDeep Dive into Salesforce APIs
Deep Dive into Salesforce APIsNeerajKumar1965
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patternsSindhu VL
 
Developing Oracle Connector Using Mule
Developing Oracle Connector Using MuleDeveloping Oracle Connector Using Mule
Developing Oracle Connector Using Muleirfan1008
 
MuleSoft Anypoint Platform and Three Tier Architecture
MuleSoft Anypoint  Platform and Three Tier ArchitectureMuleSoft Anypoint  Platform and Three Tier Architecture
MuleSoft Anypoint Platform and Three Tier ArchitectureHarish Kumar
 

What's hot (20)

Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
 
Deploying mule applications
Deploying mule applicationsDeploying mule applications
Deploying mule applications
 
Enterprise resources and mule
Enterprise resources and muleEnterprise resources and mule
Enterprise resources and mule
 
Mule Fundamentals
Mule FundamentalsMule Fundamentals
Mule Fundamentals
 
Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.Migrating to mule 4 - Are you ready for This.
Migrating to mule 4 - Are you ready for This.
 
Mule execution
Mule executionMule execution
Mule execution
 
MuleSoft certified platform architect-level 1 Real Exam Questions
MuleSoft certified platform architect-level 1 Real Exam QuestionsMuleSoft certified platform architect-level 1 Real Exam Questions
MuleSoft certified platform architect-level 1 Real Exam Questions
 
Development using anypointstudio
Development using anypointstudioDevelopment using anypointstudio
Development using anypointstudio
 
Making flow Mule
Making flow MuleMaking flow Mule
Making flow Mule
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectors
 
Anypoint platform
Anypoint platformAnypoint platform
Anypoint platform
 
Get Queue List from Microsoft Azure using Mule ESB
Get Queue List from Microsoft Azure using Mule ESBGet Queue List from Microsoft Azure using Mule ESB
Get Queue List from Microsoft Azure using Mule ESB
 
Mule sap connector
Mule sap connectorMule sap connector
Mule sap connector
 
Deep Dive into Salesforce APIs
Deep Dive into Salesforce APIsDeep Dive into Salesforce APIs
Deep Dive into Salesforce APIs
 
Mule api
Mule  apiMule  api
Mule api
 
Using mule configuration patterns
Using mule configuration patternsUsing mule configuration patterns
Using mule configuration patterns
 
Servlets api overview
Servlets api overviewServlets api overview
Servlets api overview
 
Mule CMIS connector
Mule CMIS connectorMule CMIS connector
Mule CMIS connector
 
Developing Oracle Connector Using Mule
Developing Oracle Connector Using MuleDeveloping Oracle Connector Using Mule
Developing Oracle Connector Using Mule
 
MuleSoft Anypoint Platform and Three Tier Architecture
MuleSoft Anypoint  Platform and Three Tier ArchitectureMuleSoft Anypoint  Platform and Three Tier Architecture
MuleSoft Anypoint Platform and Three Tier Architecture
 

Viewers also liked

Carlos fernando Gutierrez Trujillo
Carlos fernando Gutierrez Trujillo	Carlos fernando Gutierrez Trujillo
Carlos fernando Gutierrez Trujillo astrydquintero
 
Who will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyaniWho will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyaniXP Conference India
 
Juan Carlos Bucuro Lopez
Juan Carlos Bucuro Lopez	Juan Carlos Bucuro Lopez
Juan Carlos Bucuro Lopez astrydquintero
 
Thank you, e twinning!
Thank you, e twinning!Thank you, e twinning!
Thank you, e twinning!Natalia Orlyk
 
Martha Cecilia Duarte
Martha Cecilia Duarte	Martha Cecilia Duarte
Martha Cecilia Duarte astrydquintero
 
Mule filters
Mule filtersMule filters
Mule filterskrishashi
 
Eucharis Siganou
Eucharis SiganouEucharis Siganou
Eucharis Siganoueucharis
 
Agnes Molnar - Scoping and Enterprise Search Implementation
Agnes Molnar - Scoping and Enterprise Search ImplementationAgnes Molnar - Scoping and Enterprise Search Implementation
Agnes Molnar - Scoping and Enterprise Search ImplementationAgnes Molnar
 
Agnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365Summit
Agnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365SummitAgnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365Summit
Agnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365SummitAgnes Molnar
 
Singapore SharePoint User Group - Real World Challenges in Enterprise Search
Singapore SharePoint User Group - Real World Challenges in Enterprise SearchSingapore SharePoint User Group - Real World Challenges in Enterprise Search
Singapore SharePoint User Group - Real World Challenges in Enterprise SearchAgnes Molnar
 
SharePoint 2013 Search - Lessons Learned
SharePoint 2013 Search - Lessons LearnedSharePoint 2013 Search - Lessons Learned
SharePoint 2013 Search - Lessons LearnedAgnes Molnar
 
Οι ποταμοί της Ελλάδας
Οι ποταμοί της ΕλλάδαςΟι ποταμοί της Ελλάδας
Οι ποταμοί της Ελλάδαςrendgia giannakopoulou
 
"Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с...
"Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с..."Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с...
"Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с...rnw-aspen
 

Viewers also liked (20)

Xmas5
Xmas5Xmas5
Xmas5
 
Carlos fernando Gutierrez Trujillo
Carlos fernando Gutierrez Trujillo	Carlos fernando Gutierrez Trujillo
Carlos fernando Gutierrez Trujillo
 
Who will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyaniWho will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyani
 
Juan Carlos Bucuro Lopez
Juan Carlos Bucuro Lopez	Juan Carlos Bucuro Lopez
Juan Carlos Bucuro Lopez
 
Khust 2016
Khust 2016Khust 2016
Khust 2016
 
Simple VM in Mule
Simple VM in MuleSimple VM in Mule
Simple VM in Mule
 
Thank you, e twinning!
Thank you, e twinning!Thank you, e twinning!
Thank you, e twinning!
 
Martha Cecilia Duarte
Martha Cecilia Duarte	Martha Cecilia Duarte
Martha Cecilia Duarte
 
Christmas
ChristmasChristmas
Christmas
 
Mule filters
Mule filtersMule filters
Mule filters
 
Mule Cache Scope
Mule Cache ScopeMule Cache Scope
Mule Cache Scope
 
From Manual to Automated Tests - STAC 2015
From Manual to Automated Tests - STAC 2015From Manual to Automated Tests - STAC 2015
From Manual to Automated Tests - STAC 2015
 
Eucharis Siganou
Eucharis SiganouEucharis Siganou
Eucharis Siganou
 
Agnes Molnar - Scoping and Enterprise Search Implementation
Agnes Molnar - Scoping and Enterprise Search ImplementationAgnes Molnar - Scoping and Enterprise Search Implementation
Agnes Molnar - Scoping and Enterprise Search Implementation
 
Agnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365Summit
Agnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365SummitAgnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365Summit
Agnes Molnar - 10 Steps to be Successful with Enterprise Search #Collab365Summit
 
Singapore SharePoint User Group - Real World Challenges in Enterprise Search
Singapore SharePoint User Group - Real World Challenges in Enterprise SearchSingapore SharePoint User Group - Real World Challenges in Enterprise Search
Singapore SharePoint User Group - Real World Challenges in Enterprise Search
 
SharePoint 2013 Search - Lessons Learned
SharePoint 2013 Search - Lessons LearnedSharePoint 2013 Search - Lessons Learned
SharePoint 2013 Search - Lessons Learned
 
Mr bean
Mr beanMr bean
Mr bean
 
Οι ποταμοί της Ελλάδας
Οι ποταμοί της ΕλλάδαςΟι ποταμοί της Ελλάδας
Οι ποταμοί της Ελλάδας
 
"Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с...
"Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с..."Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с...
"Синдром истощения у ВИЧ – инфицированных пациентов: критерии диагностики и с...
 

Similar to Mule esb whole_web_services

WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015Pavel Bucek
 
Meetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedMeetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedD.Rajesh Kumar
 
West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6Francis Edwards
 
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portionmnriem
 
Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207Lori Head
 
Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex Apache Apex
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015Edward Burns
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Edward Burns
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PROIDEA
 
MuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
MuleSoft Meetup Singapore - Reliable Messaging & RTF OperationsMuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
MuleSoft Meetup Singapore - Reliable Messaging & RTF OperationsJulian Douch
 
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next LevelHortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next LevelHortonworks
 
Integrating NiFi and Apex
Integrating NiFi and ApexIntegrating NiFi and Apex
Integrating NiFi and ApexBryan Bende
 
Building Data Pipelines for Solr with Apache NiFi
Building Data Pipelines for Solr with Apache NiFiBuilding Data Pipelines for Solr with Apache NiFi
Building Data Pipelines for Solr with Apache NiFiBryan Bende
 
Mule integration-application
Mule integration-applicationMule integration-application
Mule integration-applicationNaresh Naidu
 
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideMuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideManish Kumar Yadav
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guideSrihari
 
Apache Apex Meetup at Cask
Apache Apex Meetup at CaskApache Apex Meetup at Cask
Apache Apex Meetup at CaskApache Apex
 

Similar to Mule esb whole_web_services (20)

WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
 
Meetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedMeetup bangalore 9_novupdated
Meetup bangalore 9_novupdated
 
02 basics
02 basics02 basics
02 basics
 
West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6West Yorkshire Mulesoft Meetup #6
West Yorkshire Mulesoft Meetup #6
 
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion
 
Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207Advanced Web Design And Development BIT 3207
Advanced Web Design And Development BIT 3207
 
Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex Integrating Apache NiFi and Apache Apex
Integrating Apache NiFi and Apache Apex
 
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015
 
Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015
 
Manchester Meetup #3
Manchester Meetup #3Manchester Meetup #3
Manchester Meetup #3
 
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
PLNOG15: The Power of the Open Standards SDN API’s - Mikael Holmberg
 
MuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
MuleSoft Meetup Singapore - Reliable Messaging & RTF OperationsMuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
MuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
 
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next LevelHortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
Hortonworks DataFlow (HDF) 3.3 - Taking Stream Processing to the Next Level
 
Integrating NiFi and Apex
Integrating NiFi and ApexIntegrating NiFi and Apex
Integrating NiFi and Apex
 
Building Data Pipelines for Solr with Apache NiFi
Building Data Pipelines for Solr with Apache NiFiBuilding Data Pipelines for Solr with Apache NiFi
Building Data Pipelines for Solr with Apache NiFi
 
Mule integration-application
Mule integration-applicationMule integration-application
Mule integration-application
 
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation SlideMuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
 
Web technology-guide
Web technology-guideWeb technology-guide
Web technology-guide
 
Apache Apex Meetup at Cask
Apache Apex Meetup at CaskApache Apex Meetup at Cask
Apache Apex Meetup at Cask
 
Apache flink
Apache flinkApache flink
Apache flink
 

More from Naresh Naidu

Mule esb _web_services
Mule esb _web_servicesMule esb _web_services
Mule esb _web_servicesNaresh Naidu
 
Mule esb soap web services
Mule esb soap web servicesMule esb soap web services
Mule esb soap web servicesNaresh Naidu
 
Mule esb handling errors
Mule esb handling errorsMule esb handling errors
Mule esb handling errorsNaresh Naidu
 
Mule soap web services
Mule soap web servicesMule soap web services
Mule soap web servicesNaresh Naidu
 
Mule json transformers and Examples
Mule json transformers and ExamplesMule json transformers and Examples
Mule json transformers and ExamplesNaresh Naidu
 
Mule messages and transformers
Mule messages and transformersMule messages and transformers
Mule messages and transformersNaresh Naidu
 
Mule flows subflows
Mule flows subflowsMule flows subflows
Mule flows subflowsNaresh Naidu
 
Mule filtering messages
Mule filtering messagesMule filtering messages
Mule filtering messagesNaresh Naidu
 
Mule functional testing
Mule functional testingMule functional testing
Mule functional testingNaresh Naidu
 
Mule esb, Mule Anypoint studio,Mule context, Message processing
Mule esb, Mule Anypoint studio,Mule context, Message processingMule esb, Mule Anypoint studio,Mule context, Message processing
Mule esb, Mule Anypoint studio,Mule context, Message processingNaresh Naidu
 

More from Naresh Naidu (15)

Mule data bases
Mule data basesMule data bases
Mule data bases
 
Mule esb _web_services
Mule esb _web_servicesMule esb _web_services
Mule esb _web_services
 
Mule esb soap web services
Mule esb soap web servicesMule esb soap web services
Mule esb soap web services
 
Mule esb handling errors
Mule esb handling errorsMule esb handling errors
Mule esb handling errors
 
Mule soap web services
Mule soap web servicesMule soap web services
Mule soap web services
 
Mule data mapper
Mule data mapperMule data mapper
Mule data mapper
 
Mule json transformers and Examples
Mule json transformers and ExamplesMule json transformers and Examples
Mule json transformers and Examples
 
Mule messages and transformers
Mule messages and transformersMule messages and transformers
Mule messages and transformers
 
Mule flows subflows
Mule flows subflowsMule flows subflows
Mule flows subflows
 
Mule filtering messages
Mule filtering messagesMule filtering messages
Mule filtering messages
 
Mule functional testing
Mule functional testingMule functional testing
Mule functional testing
 
Mule esb basics
Mule esb basicsMule esb basics
Mule esb basics
 
Mule esb messages
Mule esb messagesMule esb messages
Mule esb messages
 
Mule esb, Mule Anypoint studio,Mule context, Message processing
Mule esb, Mule Anypoint studio,Mule context, Message processingMule esb, Mule Anypoint studio,Mule context, Message processing
Mule esb, Mule Anypoint studio,Mule context, Message processing
 
Mule esb
Mule esbMule esb
Mule esb
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Mule esb whole_web_services

  • 1. Consuming RESTful web services l All contents Copyright © 2015, MuleSoftInc. 1 l All contents Copyright © 2015, MuleSoftInc.
  • 2. Consuming RESTful web services opyright © 2015, MuleSoft Inc. • First check and see if there is an existing Anypoint Connector to connect to the service provider • If there is not, use the HTTP Request connector - For the connector ∙ Specify host, port, and optionally, a base path - For the endpoint ∙ Specify path and method 2 l All contentsC
  • 3. • Create a second flow and rename flows • Add an HTTP Listener connector endpoint to receive requests at http://localhost:8081/united • Add an HTTP Request connector endpoint to consume a RESTful web service for United flight data Walkthrough 3-1: Consume a RESTful web service contents Copyright © 2015, MuleSoftInc.3 l All
  • 4. Passing data to a RESTful web service • For an HTTP Request endpoint, you can add parameters - URI parameters - Query parameters - Headers • Send form parameters with a request by setting them in the payload • Include attachments by adding an Attachment transformer to your flow 4 l All contents Copyright © 2015, MuleSoftInc.
  • 5. • Modify the HTTP Request connector endpoint to use a URI parameter for the destination • Set the destination to a static value • Set the destination to a dynamic query parameter value • Create a variable to set the destination Walkthrough 3-2: Pass arguments to a RESTful web service 5 l All contents Copyright © 2015, MuleSoft Inc.1
  • 6. Introducing RAML l All contents Copyright © 2015, MuleSoftInc. 6 l All contents Copyright © 2015, MuleSoftInc.
  • 7. Approaches to API design HAND CODING • Time-consuming • Maintenance nightmare • Difficult to read/ consume • Disconnected from consumer SWAGGER • Verbose • Primarily for doc generation • Limited reuse • JSON based BLUEPRINT • Markdown • Design focused • Limited reuse • Tooling is proprietary RAML • Simple and succinct • Intuitive • Open, non-proprietary • Based on standards 7 l All contents Copyright © 2015, MuleSoftInc.
  • 8. RAML: RESTful API Modeling Language • A simple and succinct way of describing RESTful APIs - Resources, schema, parameters, responses, and more • Developed to help out the current API ecosystem - Encourages reuse, enables discovery and pattern-sharing, and aims for merit-based emergence of best practices • A non-proprietary, vendor-neutral open spec • Built on broadly-used standards such as YAML and JSON - YAMLA’int a Markup Language ∙A human-readable data serialization format where data structure hierarchy is maintained by outline indentation • http://raml.org 18 8 l All contents Copyright © 2015, MuleSoftInc.
  • 9. RAML example 19 l All contents Copyright © 2015, MuleSoft Inc. 19
  • 10. Consuming RESTful web services with RAML definitions l All contents Copyright © 2015, MuleSoftInc. 20 l All contents Copyright © 2015, MuleSoftInc.
  • 11. Consuming RESTful web services with RAML definitions • A RAML location (local file or external URI) can be specified for an HTTP Request connector • After you specify a RAML location - All of the other fields will be automatically populated based on what's specified in the RAML ight © 2015, MuleSoftInc.21 l All contentsCopyr
  • 12. RAML metadata • The RAML metadata - Will be obtained every time you open the project in Studio - Kept in cache until you close the project - Can be refreshed /reloaded if the RAML changes • Is used by Studio to offer intelligent suggestions ts Copyright © 2015, MuleSoftInc. 22 l All conten
  • 13. • Add a third flow to the application • Add an endpoint to receive requests at http://localhost:8081/bank • Add an HTTP Request endpoint to consume a RESTful web service defined with a RAML file Walkthrough 3-3: Consume a RESTful web service that has a RAML definition l contents Copyright © 2015, MuleSoftInc. 23 l Al
  • 14. Consuming SOAP web services l All contents Copyright © 2015, MuleSoftInc. 24 l All contents Copyright © 2015, MuleSoftInc.
  • 15. Apache CXF • Mule’s SOAP support is based on Apache CXF - A web services framework in Java for SOAP messaging - Handles all serialization and deserialization - Handles all SOAP envelope and namespace processing - Developer sees only POJOs, etc. - not SOAP XML 25l All contents Copyright © 2015, MuleSoftInc.
  • 16. Consuming SOAP web services • First check and see if there is an existing Anypoint Connector to connect to the service provider • If there is not, use the Web Service Consumer connector - Provide the location of the WSDL - The rest will be configured for you: host, port, address, available operations • If you need more features, use the CXF component - Also used to expose an endpoint as a SOAP service 26 l All contents Copyright © 2015, MuleSoftInc.
  • 17. • Create a fourth flow with an endpoint to receive requests at http://localhost:8081/delta • Add a Web Service Consumer connector to consume a SOAP web service for Delta flight data • Use the DOM to XML transformer to display the SOAP response Walkthrough 3-4: Consume a SOAP Web Service nts Copyright © 2015, MuleSoftInc. 17 l All conte
  • 18. • Using the Web Service Consumer - Use DataWeave (or the DataMapper transformer) to add and map an input argument ∙ You will do this in module 5 Passing data to a SOAP web service 18 l All contents Copyright © 2015, MuleSoftInc.
  • 19. Summary l All contents Copyright © 2015, MuleSoftInc. 19 l All contents Copyright © 2015, MuleSoftInc.
  • 20. Summary • In this module, you learned to consume web services • Use the Web Consumer connector to consume SOAP web services • Use the HTTP Request connector to consume REST web services - With or without URI parameters and query parameters - With or without a RAML definition • RAML is the Restful API Modeling Language - A simple, succinct, open-spec standard based way to describe RESTfulAPIs 20 l All contents Copyright © 2015, MuleSoftInc.