SlideShare a Scribd company logo
Simple service rest
These tutorials show how Mule ESB configure a function as a
RESTful WebService endpoint. Mule ESB provides a built-in
REST component based on Jersey project.
In the first example, we will explore the possibility of creating
RESTful web services without using the built-in component;
The following configuration settings are done in the ‘General’
tab of the HTTP component.
Exchange-patterns: request-response
Host: localhost
Port: 8081
Path: rest
The next component in the flow is Body to Parameter
Body. The last component in the flow is Maps to XML
component.
To invoke the application throught browser window:
http://localhost:8081/rest?name=Rori&age=33
The output generated in the browser window is shown
below:
<?xml version="1.0" encoding="UTF-8"?>
<table>
<record>
<field name="age"
type="java.lang.String">25</field>
<field name="name"
type="java.lang.String">Alexander</field>
</record>
</table>
The source code of the mule flow is shown below:
<?xml version="1.0" encoding="UTF-8"?>
<mule
xmlns:tracking=http://www.mulesoft.org/schema/mule/ee/t
racking xmlns:jdbc-
ee=http://www.mulesoft.org/schema/mule/ee/jdbc
xmlns:http="http://www.mulesoft.org/schema/mule/http"
<flow name="http_restfulwsFlow" >
<http:inbound-endpoint exchange-pattern="request-
response"
host="localhost" port="8081" path="rest“
mimeType="text/plain" contentType="text/plain«
doc:name="HTTP"/>
<response>
<jdbc-ee:maps-to-xml-transformer doc:name="Maps to
XML"/>
</response>
<http:body-to-parameter-map-transformer
doc:name="Body to Parameter Map"/>
</flow>
</mule>
The grapfhic flow is:

More Related Content

PPTX
Rest fullservices
PPTX
Rest fullservices
PPTX
Rest fullservices
PPTX
Configurare http mule
PPTX
Configurare https mule
PPTX
Send email attachment using smtp in mule esb
PPTX
Bindings of components in mule
PPTX
Creating restful api using mule esb
Rest fullservices
Rest fullservices
Rest fullservices
Configurare http mule
Configurare https mule
Send email attachment using smtp in mule esb
Bindings of components in mule
Creating restful api using mule esb

What's hot (20)

PPTX
For each component in mule
PPTX
Mule using Salesforce
PPTX
Create Account in Salesforce using Mule ESB
PPTX
Mule ESB - Mock Salesforce Interface
PDF
How to connect redis and mule esb using spring data redis module
PPTX
Connect Magento & OpenERP
PPTX
Mule agent notifications
PPTX
Data weave in mule
PPT
CAF & Portlet Development Notes
PPTX
Concepts in mule
ODP
Dropbox connector Mule ESB Integration
PPTX
Filter expression in mule
PPTX
Dynamic file attribute
PPTX
Mule MongoDB connector
PPTX
Mule esb :Data Weave
PPTX
Message properties component in mule
PPTX
Hdfs connector
PPT
Mule connector for ibm® as400
PPT
Anypoint connectorfor ibm as 400
For each component in mule
Mule using Salesforce
Create Account in Salesforce using Mule ESB
Mule ESB - Mock Salesforce Interface
How to connect redis and mule esb using spring data redis module
Connect Magento & OpenERP
Mule agent notifications
Data weave in mule
CAF & Portlet Development Notes
Concepts in mule
Dropbox connector Mule ESB Integration
Filter expression in mule
Dynamic file attribute
Mule MongoDB connector
Mule esb :Data Weave
Message properties component in mule
Hdfs connector
Mule connector for ibm® as400
Anypoint connectorfor ibm as 400
Ad

Viewers also liked (20)

PDF
Web Services Atomic Transactio
PPT
WS-Privacy,
PDF
Frank Leymann @ BPMN 2010
PPT
Soa & Bpel With Web Sphere
PPTX
Semantic Web Services: A RESTful Approach
PPT
Semantic web service
PDF
Atomic Service Transactions
PPTX
REST & RESTful Web Service
PPTX
Semantic web services
PDF
Introduction and Advanced Concepts of BPEL
PPT
Soa & Bpel
PPTX
The Semantic Web #9 - Web Ontology Language (OWL)
PPTX
BPEL, BPEL vs ESB (Integration)
PDF
Restful web services by Sreeni Inturi
KEY
Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP
PPT
Service Level Agreement
PDF
REST to RESTful Web Service
PPTX
Service level agreement presentation
PDF
Web Services (SOAP, WSDL, UDDI)
PPTX
Webservices Overview : XML RPC, SOAP and REST
Web Services Atomic Transactio
WS-Privacy,
Frank Leymann @ BPMN 2010
Soa & Bpel With Web Sphere
Semantic Web Services: A RESTful Approach
Semantic web service
Atomic Service Transactions
REST & RESTful Web Service
Semantic web services
Introduction and Advanced Concepts of BPEL
Soa & Bpel
The Semantic Web #9 - Web Ontology Language (OWL)
BPEL, BPEL vs ESB (Integration)
Restful web services by Sreeni Inturi
Open Standards for the Semantic Web: XML / RDF(S) / OWL / SOAP
Service Level Agreement
REST to RESTful Web Service
Service level agreement presentation
Web Services (SOAP, WSDL, UDDI)
Webservices Overview : XML RPC, SOAP and REST
Ad

Similar to Simple service rest (20)

PPTX
Rest component demo
PPT
Rest service in mule
PPT
Rest Service In Mule
PPTX
Rest web services
PPTX
Mule soft ppt 3
PPTX
Http component
PPTX
Using mule with web services
PPTX
Mule connectors-session1
PDF
Restful web services_tutorial
PPTX
Mule esb whole_web_services
PPTX
Mule esb _web_services
PDF
Mule ESB
PPTX
Mule ESB - Consuming RESTful WS with RAML Definition
PPTX
Mule connectors-part 1
PPT
Mule web services
PPTX
RESTful web services with Groovy on Grails by Vugar Suleymanov
PPTX
Introduction to RESTful Webservices in JAVA
PPTX
Mule webservices
PPTX
Rest Component
PPT
Mule and web services
Rest component demo
Rest service in mule
Rest Service In Mule
Rest web services
Mule soft ppt 3
Http component
Using mule with web services
Mule connectors-session1
Restful web services_tutorial
Mule esb whole_web_services
Mule esb _web_services
Mule ESB
Mule ESB - Consuming RESTful WS with RAML Definition
Mule connectors-part 1
Mule web services
RESTful web services with Groovy on Grails by Vugar Suleymanov
Introduction to RESTful Webservices in JAVA
Mule webservices
Rest Component
Mule and web services

More from Domenico Schiavone (11)

PPTX
Ws through raml
PPTX
Symple io flow
PPTX
Json to xml esb transformation
PPTX
Xml to xml transformation in mule
PPTX
File tostring conversion
PPTX
Payload and logger
PPTX
Csv to xml transformation
PPTX
Json to json esb transformation
PPTX
Xml toobjectesbtransform
PPTX
Simple interact between http and java components
PPTX
Mule esb httpflow
Ws through raml
Symple io flow
Json to xml esb transformation
Xml to xml transformation in mule
File tostring conversion
Payload and logger
Csv to xml transformation
Json to json esb transformation
Xml toobjectesbtransform
Simple interact between http and java components
Mule esb httpflow

Recently uploaded (20)

PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPT
Introduction Database Management System for Course Database
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Transform Your Business with a Software ERP System
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Nekopoi APK 2025 free lastest update
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
ai tools demonstartion for schools and inter college
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Design an Analysis of Algorithms I-SECS-1021-03
Softaken Excel to vCard Converter Software.pdf
Digital Strategies for Manufacturing Companies
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ManageIQ - Sprint 268 Review - Slide Deck
Introduction Database Management System for Course Database
PTS Company Brochure 2025 (1).pdf.......
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Transform Your Business with a Software ERP System
Odoo Companies in India – Driving Business Transformation.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
VVF-Customer-Presentation2025-Ver1.9.pptx
CHAPTER 2 - PM Management and IT Context
Understanding Forklifts - TECH EHS Solution
Nekopoi APK 2025 free lastest update
Design an Analysis of Algorithms II-SECS-1021-03
ai tools demonstartion for schools and inter college

Simple service rest

  • 2. These tutorials show how Mule ESB configure a function as a RESTful WebService endpoint. Mule ESB provides a built-in REST component based on Jersey project. In the first example, we will explore the possibility of creating RESTful web services without using the built-in component;
  • 3. The following configuration settings are done in the ‘General’ tab of the HTTP component. Exchange-patterns: request-response Host: localhost Port: 8081 Path: rest
  • 4. The next component in the flow is Body to Parameter Body. The last component in the flow is Maps to XML component. To invoke the application throught browser window: http://localhost:8081/rest?name=Rori&age=33 The output generated in the browser window is shown below:
  • 5. <?xml version="1.0" encoding="UTF-8"?> <table> <record> <field name="age" type="java.lang.String">25</field> <field name="name" type="java.lang.String">Alexander</field> </record> </table>
  • 6. The source code of the mule flow is shown below: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:tracking=http://www.mulesoft.org/schema/mule/ee/t racking xmlns:jdbc- ee=http://www.mulesoft.org/schema/mule/ee/jdbc xmlns:http="http://www.mulesoft.org/schema/mule/http"
  • 7. <flow name="http_restfulwsFlow" > <http:inbound-endpoint exchange-pattern="request- response" host="localhost" port="8081" path="rest“ mimeType="text/plain" contentType="text/plain« doc:name="HTTP"/> <response> <jdbc-ee:maps-to-xml-transformer doc:name="Maps to XML"/> </response> <http:body-to-parameter-map-transformer doc:name="Body to Parameter Map"/> </flow> </mule>