SlideShare ist ein Scribd-Unternehmen logo
1 von 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.

Weitere ähnliche Inhalte

Was ist angesagt?

Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in muleRamakrishna kapa
 
Muleflowarchitecturepart2
Muleflowarchitecturepart2Muleflowarchitecturepart2
Muleflowarchitecturepart2vijaynerd
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esbPraneethchampion
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guideSindhu VL
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flowSindhu VL
 
Mule anypoint exchange
Mule  anypoint exchangeMule  anypoint exchange
Mule anypoint exchangeD.Rajesh Kumar
 
Shipping your logs to elk from mule app/cloudhub part 1
Shipping  your logs to elk from mule app/cloudhub   part 1Shipping  your logs to elk from mule app/cloudhub   part 1
Shipping your logs to elk from mule app/cloudhub part 1Alex Fernandez
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestrationSindhu VL
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
Mule UDP Transport
Mule UDP TransportMule UDP Transport
Mule UDP TransportAnkush Sharma
 
Mule esb made system integration easy
Mule esb made system integration easyMule esb made system integration easy
Mule esb made system integration easySudha Ch
 
MuleSoft ESB Composite Source
MuleSoft ESB Composite SourceMuleSoft ESB Composite Source
MuleSoft ESB Composite Sourceakashdprajapati
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esbKhasim Cise
 
Mule Complete Training
Mule Complete TrainingMule Complete Training
Mule Complete Trainingsourabh aggarwal
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mulejaveed_mhd
 
Mule anypoint connector dev kit
Mule  anypoint connector dev kitMule  anypoint connector dev kit
Mule anypoint connector dev kitD.Rajesh Kumar
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mulemdfkhan625
 

Was ist angesagt? (20)

Mule real-world-old
Mule real-world-oldMule real-world-old
Mule real-world-old
 
Load balancer in mule
Load balancer in muleLoad balancer in mule
Load balancer in mule
 
Muleflowarchitecturepart2
Muleflowarchitecturepart2Muleflowarchitecturepart2
Muleflowarchitecturepart2
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Mule - beginners guide
Mule - beginners guideMule - beginners guide
Mule - beginners guide
 
Mule soa
Mule soaMule soa
Mule soa
 
Elements in a mule flow
Elements in a mule flowElements in a mule flow
Elements in a mule flow
 
Mule anypoint exchange
Mule  anypoint exchangeMule  anypoint exchange
Mule anypoint exchange
 
Shipping your logs to elk from mule app/cloudhub part 1
Shipping  your logs to elk from mule app/cloudhub   part 1Shipping  your logs to elk from mule app/cloudhub   part 1
Shipping your logs to elk from mule app/cloudhub part 1
 
Using flows for service orchestration
Using flows for service orchestrationUsing flows for service orchestration
Using flows for service orchestration
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Mule UDP Transport
Mule UDP TransportMule UDP Transport
Mule UDP Transport
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule esb made system integration easy
Mule esb made system integration easyMule esb made system integration easy
Mule esb made system integration easy
 
MuleSoft ESB Composite Source
MuleSoft ESB Composite SourceMuleSoft ESB Composite Source
MuleSoft ESB Composite Source
 
Introduction to mule esb
Introduction to mule esbIntroduction to mule esb
Introduction to mule esb
 
Mule Complete Training
Mule Complete TrainingMule Complete Training
Mule Complete Training
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
Mule anypoint connector dev kit
Mule  anypoint connector dev kitMule  anypoint connector dev kit
Mule anypoint connector dev kit
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 

Ähnlich wie Mule esb _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
 
Manchester Meetup #3
Manchester Meetup #3Manchester Meetup #3
Manchester Meetup #3Francis Edwards
 
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
 
Apache flink
Apache flinkApache flink
Apache flinkJanu Jahnavi
 

Ähnlich wie Mule esb _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
 

Mehr von Naresh Naidu

Mule data bases
Mule data basesMule data bases
Mule data basesNaresh Naidu
 
Mule esb whole_web_services
Mule esb whole_web_servicesMule esb whole_web_services
Mule esb whole_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 data mapper
Mule data mapperMule data mapper
Mule data mapperNaresh 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 basics
Mule esb basicsMule esb basics
Mule esb basicsNaresh Naidu
 
Mule esb messages
Mule esb messagesMule esb messages
Mule esb messagesNaresh 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
 

Mehr von Naresh Naidu (15)

Mule data bases
Mule data basesMule data bases
Mule data bases
 
Mule esb whole_web_services
Mule esb whole_web_servicesMule esb whole_web_services
Mule esb whole_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
 

KĂźrzlich hochgeladen

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂşjo
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

KĂźrzlich hochgeladen (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Mule esb _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.