SlideShare una empresa de Scribd logo
1 de 18
Web services
An introduction to web service.
Prepared by:- Madhukar
What’s a Web Service?
● A web service is just a web page meant for a computer to
request and process.
● More precisely, a Web service is a Web page that’s meant
to be consumed by an autonomous program as opposed
to a Web browser or similar UI tool.
● Even more precisely the name it self indicates that its a
service which is available over the Web, that’s it.
Examples of web service
● An e-commerce company can use a shipper’s
web service to calculate the exact cost of a
shipment.
● National weather forecasters use them to
supply data to web-sites and news
organizations.
● Stock prices are provided this way by major
exchanges and corporations.
Benefits of Web Services
● Simple – easily supported on many platforms
● Loosely Coupled – the interface can be extended and
new methods added without affecting clients as long as
old methods and parameters are still provided
● Stateless – a request is made, then result is returned
and the connection closes, no permanent connection
● Firewall Friendly – uses HTTP, not usually blocked
When to use Web Services
● Cross platform – i.e. Communicate between a
Java app and a .NET app
● Cross trust boundaries – between two
unrelated organizations
● Future considerations – if there is a possibility
that the logic may have to support third party
integration
● Comunication between IOS and java.
When to Avoid Web Services
● .Net to .Net – there are better ways to
communicate between servers, such as .NET
remoting
● .Net Apps – rather than provide a Service, if two
apps need the same logic create a class library
assembly compiled to a DLL, which is then
used in both apps.
Types of web service
● SOAP(Simple object access protocol)
● REST(Representational state transfer)
We have different type of specifications to implement SOAP and REST services.
● AX-RS provides the implementation of RESTful web services, JAX-RS is a
specification for RESTful Web Services with Java and it is given by Sun. Since it is a
specification, other frameworks can be written to implement these specifications, and
that includes Jersey from Oracle, Resteasy from Jboss, CXF from Apache bla bla.
● JAX-WS, Apache Axis2 provides the implementation for SOAP
● Apache CXF provides implementation for SOAP and RESTful services both.
REST web service
● What ever the data/response we will get from
the server is known as Resource
● Each resource can be accessed by its URI’s.
● We can get the resource from RESTful service
in different formats like,
HTML,XML,JSON,TEXT,PDF and in the Image
formats as well, but in real time we mainly we
will prefer JSON.
REST web service
● REST always prefers to choose HTTP as it a
stateless protocol.
REST web service
RESTful used 4 main HTTP methods…
● GET - Retrieve Data
● POST- Create/Insert Data
● PUT- Update Data
● DELETE- Delete Data
RESTful Web Services (JAX-RS)
Annotations
●
@Path(‘Path‘)
●
@GET
●
@POST
●
@PUT
● @DELETE
● @Produces(MediaType.TEXT_PLAIN [, more-types])
● @Consumes(type[, more-types])
● @PathParam()
● @QueryParam()
● @MatrixParam()
● @FormParam()
How RESTful Web Services Extract
Input Parameters
● @PathParam,@QueryParam,@MatrixParam are parameter annotations
which allows us to map variable URI path fragments into your method
call.
● @PathParam URL Syntax
http://localhost:8080/<Rest Service Name>/rest/customers/100/ccs.
● @QueryParam URL Syntax
http://localhost:8080/…/rest/customers?custNo=100&custName=ccs
● @MatrixParam URL Syntax
http://localhost:8080/…/rest/customers;custNo=100;custName=ccs..
SOAP web service
●
SOAP stands for Simple Object Access Protocol
●
SOAP is a communication protocol
●
SOAP is for communication between applications
●
SOAP is a format for sending messages
● SOAP communicates via Internet
● SOAP is platform independent
● SOAP is language independent
● SOAP is based on XML
● SOAP is simple and extensible
● SOAP allows you to get around firewalls
● SOAP is a W3C recommendation
SOAP web service
Why SOAP?
●
It is important for application development to allow Internet communication between programs.
●
Today's applications communicate using Remote Procedure Calls (RPC) between objects like
DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and
security problem; firewalls and proxy servers will normally block this kind of traffic.
●
A better way to communicate between applications is over HTTP, because HTTP is supported
by all Internet browsers and servers. SOAP was created to accomplish this.
●
SOAP provides a way to communicate between applications running on different operating
systems, with different technologies and programming languages.
SOAP web service
SOAP Building Blocks
● A SOAP message is an ordinary XML document containing the
following elements:
● An Envelope element that identifies the XML document as a
SOAP message
● A Header element that contains header information
● A Body element that contains call and response information
● A Fault element containing errors and status information
SOAP web service
WSDL
● “ Web Service Description Language” is an XML document that
defines the service interface, protocol bindings, and service
endpoint addresses
● Uses XML schema to define XML types
● Typically uses SOAP to bind the messaging protocol
UDDI
● “ Universal Description, Discovery and Integration” is a
repository/database of services (e.g. defined by WSDLs)
Web service Introduction
Web service Introduction

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
jQuery Ajax
jQuery AjaxjQuery Ajax
jQuery Ajax
 
HTTPS
HTTPSHTTPS
HTTPS
 
HTTP Basics
HTTP BasicsHTTP Basics
HTTP Basics
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 
Http VS. Https
Http VS. HttpsHttp VS. Https
Http VS. Https
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
Jsp ppt
Jsp pptJsp ppt
Jsp ppt
 
Web Development
Web DevelopmentWeb Development
Web Development
 
SOAP, WSDL and UDDI
SOAP, WSDL and UDDISOAP, WSDL and UDDI
SOAP, WSDL and UDDI
 
Web server
Web serverWeb server
Web server
 
SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access Protocol
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about servers
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
 
HTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status CodeHTTP Request Header and HTTP Status Code
HTTP Request Header and HTTP Status Code
 
WebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDIWebServices SOAP WSDL and UDDI
WebServices SOAP WSDL and UDDI
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 
RESTful Web Services
RESTful Web ServicesRESTful Web Services
RESTful Web Services
 
HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)HyperText Transfer Protocol (HTTP)
HyperText Transfer Protocol (HTTP)
 

Destacado

Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...
Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...
Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...The European GNSS Agency (GSA)
 
Introduction to web services and how to in php
Introduction to web services and how to in phpIntroduction to web services and how to in php
Introduction to web services and how to in phpAmit Kumar Singh
 
Touch me - Vom Wandel im Umgang mit dem Computer
Touch me - Vom Wandel im Umgang mit dem ComputerTouch me - Vom Wandel im Umgang mit dem Computer
Touch me - Vom Wandel im Umgang mit dem ComputerSENSORY-MINDS
 
TourOn Multimedia Guided Tour App
TourOn Multimedia Guided Tour AppTourOn Multimedia Guided Tour App
TourOn Multimedia Guided Tour AppTourOn
 
Collaborative Networks for Intranet
Collaborative Networks for IntranetCollaborative Networks for Intranet
Collaborative Networks for IntranetMark Fidelman
 
Marketing of a new App Tour-o-pedia
Marketing of a new App Tour-o-pediaMarketing of a new App Tour-o-pedia
Marketing of a new App Tour-o-pediaaditya ghuge
 
Knowledge management and emerging collaborative networks in tourism business ...
Knowledge management and emerging collaborative networks in tourism business ...Knowledge management and emerging collaborative networks in tourism business ...
Knowledge management and emerging collaborative networks in tourism business ...Jari Jussila
 
KI School - Підсумки 2015
KI School - Підсумки 2015KI School - Підсумки 2015
KI School - Підсумки 2015Karpaty.info
 

Destacado (16)

Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...
Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...
Galileo Search & Rescue workshop_European Space Solutions 2016_HELIOS - Alain...
 
Virtual Classroom
Virtual ClassroomVirtual Classroom
Virtual Classroom
 
Introduction to web services and how to in php
Introduction to web services and how to in phpIntroduction to web services and how to in php
Introduction to web services and how to in php
 
Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web Services
 
Naswiz tour app
Naswiz tour appNaswiz tour app
Naswiz tour app
 
Tcm presentation d 2015
Tcm presentation d 2015Tcm presentation d 2015
Tcm presentation d 2015
 
Touch me - Vom Wandel im Umgang mit dem Computer
Touch me - Vom Wandel im Umgang mit dem ComputerTouch me - Vom Wandel im Umgang mit dem Computer
Touch me - Vom Wandel im Umgang mit dem Computer
 
TourOn Multimedia Guided Tour App
TourOn Multimedia Guided Tour AppTourOn Multimedia Guided Tour App
TourOn Multimedia Guided Tour App
 
Collaborative Networks for Intranet
Collaborative Networks for IntranetCollaborative Networks for Intranet
Collaborative Networks for Intranet
 
Galileo gnss
Galileo gnssGalileo gnss
Galileo gnss
 
Marketing of a new App Tour-o-pedia
Marketing of a new App Tour-o-pediaMarketing of a new App Tour-o-pedia
Marketing of a new App Tour-o-pedia
 
My tour app
My tour appMy tour app
My tour app
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Knowledge management and emerging collaborative networks in tourism business ...
Knowledge management and emerging collaborative networks in tourism business ...Knowledge management and emerging collaborative networks in tourism business ...
Knowledge management and emerging collaborative networks in tourism business ...
 
Mobile Apps For Tourism Industry
Mobile Apps For Tourism IndustryMobile Apps For Tourism Industry
Mobile Apps For Tourism Industry
 
KI School - Підсумки 2015
KI School - Підсумки 2015KI School - Підсумки 2015
KI School - Підсумки 2015
 

Similar a Web service Introduction

SpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web ServicesSpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web ServicesSpringPeople
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Vibhawa Nirmal
 
Web service implementation
Web service implementationWeb service implementation
Web service implementationYatindra Sahu
 
WebService-Java
WebService-JavaWebService-Java
WebService-Javahalwal
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIPankaj Bajaj
 
Web Service
Web ServiceWeb Service
Web ServiceKumar S
 
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archunit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archsudharani127782
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETPonraj
 
APIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfAPIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfWilliamELKAIMPhd
 
Web Services in Cloud Computing.pptx
Web Services in Cloud Computing.pptxWeb Services in Cloud Computing.pptx
Web Services in Cloud Computing.pptxssuser403d87
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webserviceDong Ngoc
 

Similar a Web service Introduction (20)

Web services
Web servicesWeb services
Web services
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Web services
Web servicesWeb services
Web services
 
SpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web ServicesSpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web Services
 
API.pdf
API.pdfAPI.pdf
API.pdf
 
Application.pdf
Application.pdfApplication.pdf
Application.pdf
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 
Web service implementation
Web service implementationWeb service implementation
Web service implementation
 
Java web services
Java web servicesJava web services
Java web services
 
WebService-Java
WebService-JavaWebService-Java
WebService-Java
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
 
Web Service
Web ServiceWeb Service
Web Service
 
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archunit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
 
CS-802 Act-1.ppt
CS-802 Act-1.pptCS-802 Act-1.ppt
CS-802 Act-1.ppt
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
 
APIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfAPIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdf
 
Web Services in Cloud Computing.pptx
Web Services in Cloud Computing.pptxWeb Services in Cloud Computing.pptx
Web Services in Cloud Computing.pptx
 
6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 

Último

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
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
 
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
 
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
 
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
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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
 

Último (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
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
 
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...
 
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...
 
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
 
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
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 

Web service Introduction

  • 1. Web services An introduction to web service. Prepared by:- Madhukar
  • 2. What’s a Web Service? ● A web service is just a web page meant for a computer to request and process. ● More precisely, a Web service is a Web page that’s meant to be consumed by an autonomous program as opposed to a Web browser or similar UI tool. ● Even more precisely the name it self indicates that its a service which is available over the Web, that’s it.
  • 3. Examples of web service ● An e-commerce company can use a shipper’s web service to calculate the exact cost of a shipment. ● National weather forecasters use them to supply data to web-sites and news organizations. ● Stock prices are provided this way by major exchanges and corporations.
  • 4. Benefits of Web Services ● Simple – easily supported on many platforms ● Loosely Coupled – the interface can be extended and new methods added without affecting clients as long as old methods and parameters are still provided ● Stateless – a request is made, then result is returned and the connection closes, no permanent connection ● Firewall Friendly – uses HTTP, not usually blocked
  • 5. When to use Web Services ● Cross platform – i.e. Communicate between a Java app and a .NET app ● Cross trust boundaries – between two unrelated organizations ● Future considerations – if there is a possibility that the logic may have to support third party integration ● Comunication between IOS and java.
  • 6. When to Avoid Web Services ● .Net to .Net – there are better ways to communicate between servers, such as .NET remoting ● .Net Apps – rather than provide a Service, if two apps need the same logic create a class library assembly compiled to a DLL, which is then used in both apps.
  • 7. Types of web service ● SOAP(Simple object access protocol) ● REST(Representational state transfer) We have different type of specifications to implement SOAP and REST services. ● AX-RS provides the implementation of RESTful web services, JAX-RS is a specification for RESTful Web Services with Java and it is given by Sun. Since it is a specification, other frameworks can be written to implement these specifications, and that includes Jersey from Oracle, Resteasy from Jboss, CXF from Apache bla bla. ● JAX-WS, Apache Axis2 provides the implementation for SOAP ● Apache CXF provides implementation for SOAP and RESTful services both.
  • 8. REST web service ● What ever the data/response we will get from the server is known as Resource ● Each resource can be accessed by its URI’s. ● We can get the resource from RESTful service in different formats like, HTML,XML,JSON,TEXT,PDF and in the Image formats as well, but in real time we mainly we will prefer JSON.
  • 9. REST web service ● REST always prefers to choose HTTP as it a stateless protocol.
  • 10. REST web service RESTful used 4 main HTTP methods… ● GET - Retrieve Data ● POST- Create/Insert Data ● PUT- Update Data ● DELETE- Delete Data
  • 11. RESTful Web Services (JAX-RS) Annotations ● @Path(‘Path‘) ● @GET ● @POST ● @PUT ● @DELETE ● @Produces(MediaType.TEXT_PLAIN [, more-types]) ● @Consumes(type[, more-types]) ● @PathParam() ● @QueryParam() ● @MatrixParam() ● @FormParam()
  • 12. How RESTful Web Services Extract Input Parameters ● @PathParam,@QueryParam,@MatrixParam are parameter annotations which allows us to map variable URI path fragments into your method call. ● @PathParam URL Syntax http://localhost:8080/<Rest Service Name>/rest/customers/100/ccs. ● @QueryParam URL Syntax http://localhost:8080/…/rest/customers?custNo=100&custName=ccs ● @MatrixParam URL Syntax http://localhost:8080/…/rest/customers;custNo=100;custName=ccs..
  • 13. SOAP web service ● SOAP stands for Simple Object Access Protocol ● SOAP is a communication protocol ● SOAP is for communication between applications ● SOAP is a format for sending messages ● SOAP communicates via Internet ● SOAP is platform independent ● SOAP is language independent ● SOAP is based on XML ● SOAP is simple and extensible ● SOAP allows you to get around firewalls ● SOAP is a W3C recommendation
  • 14. SOAP web service Why SOAP? ● It is important for application development to allow Internet communication between programs. ● Today's applications communicate using Remote Procedure Calls (RPC) between objects like DCOM and CORBA, but HTTP was not designed for this. RPC represents a compatibility and security problem; firewalls and proxy servers will normally block this kind of traffic. ● A better way to communicate between applications is over HTTP, because HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this. ● SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
  • 15. SOAP web service SOAP Building Blocks ● A SOAP message is an ordinary XML document containing the following elements: ● An Envelope element that identifies the XML document as a SOAP message ● A Header element that contains header information ● A Body element that contains call and response information ● A Fault element containing errors and status information
  • 16. SOAP web service WSDL ● “ Web Service Description Language” is an XML document that defines the service interface, protocol bindings, and service endpoint addresses ● Uses XML schema to define XML types ● Typically uses SOAP to bind the messaging protocol UDDI ● “ Universal Description, Discovery and Integration” is a repository/database of services (e.g. defined by WSDLs)