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

Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)
Martin Necasky
 

La actualidad más candente (20)

Introduction to Web Services
Introduction to Web ServicesIntroduction to Web Services
Introduction to Web Services
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 
web server
web serverweb server
web server
 
REST API
REST APIREST API
REST API
 
Soap Vs Rest
Soap Vs RestSoap Vs Rest
Soap Vs Rest
 
Introduction to HTTP protocol
Introduction to HTTP protocolIntroduction to HTTP protocol
Introduction to HTTP protocol
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
 
Web server
Web serverWeb server
Web server
 
Application server
Application serverApplication server
Application server
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
Web services SOAP
Web services SOAPWeb services SOAP
Web services SOAP
 
Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)Web Services - Architecture and SOAP (part 1)
Web Services - Architecture and SOAP (part 1)
 
Json
JsonJson
Json
 
Web Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScriptWeb Development with HTML5, CSS3 & JavaScript
Web Development with HTML5, CSS3 & JavaScript
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 

Destacado

Destacado (15)

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
 
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

Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
Ponraj
 

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
 
SOAP - Simple Object Access Protocol
SOAP - Simple Object Access ProtocolSOAP - Simple Object Access Protocol
SOAP - Simple Object Access Protocol
 
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
 

Último

+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
Safe Software
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+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...
 
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?
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
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
 
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
 
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...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

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)