SlideShare a Scribd company logo
1 of 12
MULE SOFT
Agenda
Mule Integration Workshop
REST Webservices
Mule ESB 3.x
Mule Management Console
• Mule ESB 3.x
• Mule Management Console
• Mule Studio
Basic Webservices – Web Service Style
A web service is a service which uses a set of web standards (e.g., HTTP, SOAP, JSON,
etc...,) to expose its interface to its clients and interact with them. Two main web
service flavors are:
WS-*
RESTful
With WS-* web services, a client application utilize XML messages using the SOAP
standard. Such a request is recognized by the web service and returns a response to
the client. If a client does not know what operations a web service provides, then the
WSDL for the service can be queried to see what operations are supported before
the request is made.
WS-* services can be constructed using various technologies – Axis, CXF and .NET
being the most popular – and clients can also invoke these services using any of
these technologies. Mule enables the use of web services by providing an Axis and a
CXF transport.
RESTful services on the other hand are invoked using a URI and unlike WS-* are not
restricted to use SOAP XML payloads. RESTful services make use
Basic Webservices – Web Service Style (Contd)
of the HTTP APIs to expose different services, unlike WS-* which uses a
WSDL to define the API.
 Both of these web service styles are typically synchronous, client sends a request
and it expects a response.
Mule and Web Services
Mule and Web Services
The diagram here shows how Mule can interact with web services. On the left, we can
see that a third-party item (such as an application) is making a web service call, which
refers to a service that is hosted in Mule. This web service call is nothing more than an
inbound endpoint for the service. By using inbound web service endpoints, Mule can host
web services that are accessible to any other application.
On the right side, we can see that a service in Mule is making a web service call to a third-
party item. This web service call is nothing more than an outbound endpoint for the
service. By using outbound web service endpoints, Mule can connect to web services
hosted by any other application.
Web Service Security in Mule
Since REST is dependent on the HTTP transport, it is very simple to use the security layer
of the HTTP to secure a REST service. These include
• HTTPS Transport Level Security
o Authentication using Certs
o Confidentiality (Encryption)
o Integrity
• HTTP Basic Authentication using Spring
When SOAP services are being hosted on HTTP, which is in most cases, the above options
are also available. However, since SOAP services are aimed at being transport neutral,
they also provide a set of standards covered by the WS-* umbrella, some of which are:
• XML Encryption
• XML Signature
With SOAP services, Mule also offers SAML integration for single sign-on.
Jersey Framework
In Mule, support for REST is provided through the Jersey module, which leverages the
JAX-RS API to produce and process REST messages.
Using Jersey, the message’s payload is not restricted to any particular structure.
Therefore, payloads such as text, JSON, XML, and binary may be used. However, this
module may only be used in conjunction with the HTTP transport.
REST
REST is an architectural style for accessing information on the web.
In the REST architectural style, information on the server side is considered a resource,
which may be accessed in a uniform way, using web URIs (Uniform Resource Identifiers)
and HTTP.
Since REST uses HTTP as the communication protocol, the REST style is constrained to a
stateless client/server architecture.
Jersey Framework - REST
 Important HTTP methods:
 GET (gets a resource, similar to WWW)
 PUT (updates a resource, not commonly found in WWW)
 POST (creates a new entry, similar to WWW)
 DELETE (removes a resource, not commonly found in WWW)
JAX-RS
 JAX-RS uses annotations to build RESTful web services. Annotations, along with the
classes and interfaces provided by the JAX-RS API, allow to expose simple POJOs as
web resources.
 There are a number of JAX-RS implementations including Jersey (which is what
Mule uses to provide REST support), Restlet and RESTEasy.
Jersey Framework – JAX - RS(Contd)
Eg: Example for how to use these annotations to annotate POJO to be configured later as a REST service.
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
@Path("/")
public class HelloRestComponent {
@GET
@Produces("text/plain")
@Path("/greeting/{name}")
public String greet(@PathParam("name") String input){ return "Hello "+ input; }
}
In the above Java class, we are telling our JAX-RS server that this component should be hosted on the resource
URI “/”, using the @Path annotation, hence if the server is listening on http://localhost:8080/hello, then our
HelloRestComponent will be listening on http://localhost:8080/hello/. The greet() method is annotated as a
GET method, and with the @Path having a value of /greeting/{name}. This means that when the client asks for
the resource http://localhost:8080/hello/greeting/mule, the greet() method will be invoked passing the mule
parameter from the URI into the input parameter on the greet() method. The mule parameter is injected in the
input parameter through the @PathParam annotation.
Deploying the JAX-RS service in Mule
Deploying the JAX-RS service in Mule
 Exposing a REST service in Mule is as easy as configuring an HTTP inbound
endpoint followed by a Jersey resource element containing the
component as shown here:
Eg:
<flow name="RestHelloFlow">
<http:inbound-endpoint address="http://localhost:8080/hello" />
<jersey:resources> <component class="com...HelloRestComponent" /> </jersey:resources>
</flow>
 If the flow is not going to be followed by other message processors
following the Jersey resource, then use a shortcut configuration to
configure your service:
Eg:
<simple-service name="RestHelloService" component-class="com...HelloRestComponent" type="jax-rs"
address=" http://localhost:8080/hello"/>
Thank You

More Related Content

What's hot

Mule core concepts
Mule core conceptsMule core concepts
Mule core conceptsSindhu VL
 
Mule soap client demo
Mule soap client demoMule soap client demo
Mule soap client demoKaj Bromose
 
WebService-Java
WebService-JavaWebService-Java
WebService-Javahalwal
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigMandakini Kumari
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in muleSindhu VL
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overviewRaveendra Bhat
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using MuleKhasim Cise
 
Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesIMC Institute
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesIMC Institute
 
Mule execution units
Mule execution unitsMule execution units
Mule execution unitskiranvanga
 
Mulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service ConsumerMulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service ConsumerVince Soliza
 
Jax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformJax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformWSO2
 

What's hot (20)

Mule core concepts
Mule core conceptsMule core concepts
Mule core concepts
 
Mule soap client demo
Mule soap client demoMule soap client demo
Mule soap client demo
 
WebService-Java
WebService-JavaWebService-Java
WebService-Java
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
 
Webservice vm in mule
Webservice vm in muleWebservice vm in mule
Webservice vm in mule
 
Java web services
Java web servicesJava web services
Java web services
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
Core concepts in mule
Core concepts in muleCore concepts in mule
Core concepts in mule
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
ESB introduction using Mule
ESB introduction using MuleESB introduction using Mule
ESB introduction using Mule
 
Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web Services
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web Services
 
Mule execution units
Mule execution unitsMule execution units
Mule execution units
 
Web Services
Web ServicesWeb Services
Web Services
 
Mulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service ConsumerMulesoft Consuming Web Service - Web Service Consumer
Mulesoft Consuming Web Service - Web Service Consumer
 
Jax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformJax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 Platform
 
Overview of java web services
Overview of java web servicesOverview of java web services
Overview of java web services
 

Similar to Mule soft ppt 3

Xml web services
Xml web servicesXml web services
Xml web servicesRaghu nath
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni InturiSreeni I
 
Rest vs soap
Rest vs soapRest vs soap
Rest vs soapNaseers
 
Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservicesGagandeep Singh
 
Day1 : web service basics
Day1 :  web service basics Day1 :  web service basics
Day1 : web service basics Testing World
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Mindfire Solutions
 
Rest service in mule
Rest service in mule Rest service in mule
Rest service in mule Harish43
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Kevin Lee
 
web programming
web programmingweb programming
web programmingshreeuva
 
Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Aravindharamanan S
 
53 hui homework2
53 hui homework253 hui homework2
53 hui homework2huis89
 
Web services for developer
Web services for developerWeb services for developer
Web services for developerRafiq Ahmed
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Conceptspasam suresh
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
 

Similar to Mule soft ppt 3 (20)

Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Xml web services
Xml web servicesXml web services
Xml web services
 
Restful web services by Sreeni Inturi
Restful web services by Sreeni InturiRestful web services by Sreeni Inturi
Restful web services by Sreeni Inturi
 
Rest vs soap
Rest vs soapRest vs soap
Rest vs soap
 
Unit 2
Unit 2Unit 2
Unit 2
 
Introduction to webservices
Introduction to webservicesIntroduction to webservices
Introduction to webservices
 
Day1 : web service basics
Day1 :  web service basics Day1 :  web service basics
Day1 : web service basics
 
WIT UNIT-5.pdf
WIT UNIT-5.pdfWIT UNIT-5.pdf
WIT UNIT-5.pdf
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 
Rest service in mule
Rest service in mule Rest service in mule
Rest service in mule
 
Rest Service In Mule
Rest Service In Mule Rest Service In Mule
Rest Service In Mule
 
Xml.ppt
Xml.pptXml.ppt
Xml.ppt
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
 
web programming
web programmingweb programming
web programming
 
Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0Secc tutorials development and deployment of rest web services in java_v2.0
Secc tutorials development and deployment of rest web services in java_v2.0
 
53 hui homework2
53 hui homework253 hui homework2
53 hui homework2
 
Web services for developer
Web services for developerWeb services for developer
Web services for developer
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 

Recently uploaded

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 

Mule soft ppt 3

  • 3. Mule ESB 3.x Mule Management Console • Mule ESB 3.x • Mule Management Console • Mule Studio
  • 4. Basic Webservices – Web Service Style A web service is a service which uses a set of web standards (e.g., HTTP, SOAP, JSON, etc...,) to expose its interface to its clients and interact with them. Two main web service flavors are: WS-* RESTful With WS-* web services, a client application utilize XML messages using the SOAP standard. Such a request is recognized by the web service and returns a response to the client. If a client does not know what operations a web service provides, then the WSDL for the service can be queried to see what operations are supported before the request is made. WS-* services can be constructed using various technologies – Axis, CXF and .NET being the most popular – and clients can also invoke these services using any of these technologies. Mule enables the use of web services by providing an Axis and a CXF transport. RESTful services on the other hand are invoked using a URI and unlike WS-* are not restricted to use SOAP XML payloads. RESTful services make use
  • 5. Basic Webservices – Web Service Style (Contd) of the HTTP APIs to expose different services, unlike WS-* which uses a WSDL to define the API.  Both of these web service styles are typically synchronous, client sends a request and it expects a response. Mule and Web Services
  • 6. Mule and Web Services The diagram here shows how Mule can interact with web services. On the left, we can see that a third-party item (such as an application) is making a web service call, which refers to a service that is hosted in Mule. This web service call is nothing more than an inbound endpoint for the service. By using inbound web service endpoints, Mule can host web services that are accessible to any other application. On the right side, we can see that a service in Mule is making a web service call to a third- party item. This web service call is nothing more than an outbound endpoint for the service. By using outbound web service endpoints, Mule can connect to web services hosted by any other application.
  • 7. Web Service Security in Mule Since REST is dependent on the HTTP transport, it is very simple to use the security layer of the HTTP to secure a REST service. These include • HTTPS Transport Level Security o Authentication using Certs o Confidentiality (Encryption) o Integrity • HTTP Basic Authentication using Spring When SOAP services are being hosted on HTTP, which is in most cases, the above options are also available. However, since SOAP services are aimed at being transport neutral, they also provide a set of standards covered by the WS-* umbrella, some of which are: • XML Encryption • XML Signature With SOAP services, Mule also offers SAML integration for single sign-on.
  • 8. Jersey Framework In Mule, support for REST is provided through the Jersey module, which leverages the JAX-RS API to produce and process REST messages. Using Jersey, the message’s payload is not restricted to any particular structure. Therefore, payloads such as text, JSON, XML, and binary may be used. However, this module may only be used in conjunction with the HTTP transport. REST REST is an architectural style for accessing information on the web. In the REST architectural style, information on the server side is considered a resource, which may be accessed in a uniform way, using web URIs (Uniform Resource Identifiers) and HTTP. Since REST uses HTTP as the communication protocol, the REST style is constrained to a stateless client/server architecture.
  • 9. Jersey Framework - REST  Important HTTP methods:  GET (gets a resource, similar to WWW)  PUT (updates a resource, not commonly found in WWW)  POST (creates a new entry, similar to WWW)  DELETE (removes a resource, not commonly found in WWW) JAX-RS  JAX-RS uses annotations to build RESTful web services. Annotations, along with the classes and interfaces provided by the JAX-RS API, allow to expose simple POJOs as web resources.  There are a number of JAX-RS implementations including Jersey (which is what Mule uses to provide REST support), Restlet and RESTEasy.
  • 10. Jersey Framework – JAX - RS(Contd) Eg: Example for how to use these annotations to annotate POJO to be configured later as a REST service. import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; @Path("/") public class HelloRestComponent { @GET @Produces("text/plain") @Path("/greeting/{name}") public String greet(@PathParam("name") String input){ return "Hello "+ input; } } In the above Java class, we are telling our JAX-RS server that this component should be hosted on the resource URI “/”, using the @Path annotation, hence if the server is listening on http://localhost:8080/hello, then our HelloRestComponent will be listening on http://localhost:8080/hello/. The greet() method is annotated as a GET method, and with the @Path having a value of /greeting/{name}. This means that when the client asks for the resource http://localhost:8080/hello/greeting/mule, the greet() method will be invoked passing the mule parameter from the URI into the input parameter on the greet() method. The mule parameter is injected in the input parameter through the @PathParam annotation.
  • 11. Deploying the JAX-RS service in Mule Deploying the JAX-RS service in Mule  Exposing a REST service in Mule is as easy as configuring an HTTP inbound endpoint followed by a Jersey resource element containing the component as shown here: Eg: <flow name="RestHelloFlow"> <http:inbound-endpoint address="http://localhost:8080/hello" /> <jersey:resources> <component class="com...HelloRestComponent" /> </jersey:resources> </flow>  If the flow is not going to be followed by other message processors following the Jersey resource, then use a shortcut configuration to configure your service: Eg: <simple-service name="RestHelloService" component-class="com...HelloRestComponent" type="jax-rs" address=" http://localhost:8080/hello"/>