SlideShare uma empresa Scribd logo
1 de 23
Web Services
WEB SERVICES: INTRODUCTION
Web Service - Definition
• A s/w component stored on one computer &
accessed via method calls by an appln (or other
s/w component) on another computer over n/w.
• “a s/w s/m - to support interoperable m/c-to-
m/c interaction over a n/w”
How Web Service Works
• A SOA is a collection of services.
• services commn with each other & involve simple data
passing , call 2 or more services – coord some activity.
• service - is a function i.e., well-defined, self-contained
& does not depend on context or state of other
services.
• Web services commn. using such techno. as XML and
HTTP
• Simple Object Access Protocol (SOAP)
• XML-based protocol - allows web services & clients to
comm. in a platform-independent manner.
Web Service
Web Services
• Example:
• Amazon, Google, eBay, PayPal &
• applns available to partners via web services
• Using WS, need less time develop new applns
& create innovative new applns
• 2 parties involved –
• web service provider and
• web service consumer.
Web Service
Web Services
• Web Services is
– App to app commn.
– Interoperability b/w disparate systems.
– Comm over network.
– Exposed interface - platform indep & internal impl. is
abstract.
– Enables loosely coupled design.
– Open protocol is used for establishing comm
– Web services are self contained.
• 2 categories of web services
1. SOAP Web Service
2. RESTful Web Service
SOAP Web Service
• is a std protocol spec for msg xchg based on
XML.
• Comm b/w WS & client happens using XML
msgs.
• It defines rules for comm like what tags are
used in XML & their meaning.
RESTful Web Service
• RESTful web service uses archi - use HTTP or
similar protocols by restricting interface to use
std operations - GET, POST,… for HTTP.
Comparision
• REST services
Architectural style
Simply calls services via URL path
Lightweight – no extra xml markup
Easy to build – no toolkits required
• SOAP services
XML-based protocol
Invokes services by calling RPC method
Rigid – type checking, adheres to a contract
Development tools – WSDL Soap analyser tool,
oXygen XML
COMPONENTS OF WEB SERVICES
• Basic WS platform is XML + HTTP.
• All std WS work using following components
1. SOAP (Simple Object Access Protocol)
2. UDDI (Universal Description, Discovery and
Integration)
3. WSDL (Web Services Description Language)
COMPONENTS OF WEB SERVICES
• 1. SOAP
• simple & lightweight - xchg struct. & typed info. b/w
peers - decentralized, distri env. - using XML
• 2. WSDL
• is an xml file – describes WS in a m/c readable format.
• specify Port / Endpt – URL of the web service
• Input /output message format
• Security protocol i.e., to be followed (like https)
• 3. UDDI – Service Registry
• defines a std way to desc WS, reg WS – in a well-
known registry
Advantages Of Web Services
• Interoperability - distri. app that span diverse
h/w & s/w platforms
• Easy, widespread access to app thru firewalls
using Web protocols
• cross-plat, cross-lang data model (XML) - develop
heterogeneous distri. App
• Use of Std protocols & spec enables integ with
other msg S/m, Legacy S/m, etc
• Seamless Integ of B2B app
Java Web Services Basics
1. Remote machine or server
–computer - where WS resides
– client app access WS - send a method call over a n/w to remote
m/c – processes call & returns a resp over n/w to app
2. In Java, WS impl - as class that resides on a server
3. Publishing (deploying) a WS
– Making a WS available to receive client req
4. Consuming a web service
– Using WS from client app
Consuming WS (client) has 2 parts:
–obj of a proxy class - interact with WS
–client app that consumes WS by invoking methods on proxy obj
–proxy obj handles details of comm with WS on client‟s behalf
JAX-WS 2.0
• Req to & resp from WS transmit via SOAP
• Any client capable of generate & process SOAP
msg can interact with a WS, regardless lang in
which the WS is written
Interaction between web service
client and web service
What are stubs?
• is a small prg routine – substitutes longer prg
to load later or located remotely.
• stub accepts req & then fwds it to the remote
procedure.
• When procedure complete its service –
returns results or other status to stub –
• Stub passes it back to prg that made the req.
Web Services Architecture
• Web Services involve 3 major roles
1. Service Provider
2. Service Registry
3. Service Consumer
• 3 major operations surround web services
1. Publishing – making a service available
2. Finding – locating web services
3. Binding – using web services
Web Services Architecture
Web Services Architecture
Creating, Publishing, Testing &
Describing Web Services
• @WebService annotation
– Indicates - class repre. WS
– Optional element name - is the name of the proxy
class i.e., generated for client
– Optional element serviceName – is name of the
class that client uses to obtain a proxy object.
@WebMethod annotation
• Optional operationName element - specify
method name i.e., exposed to the web service
client
@WebParam annotation
• Parameters of web methods r annotated -
@WebParam annotation
• @WebService annotation –used in generating
WSDL file.
• serviceName - same as WSDL ele. service
• name - same as WSDL element <portType name>
• endpointInterface - user defined name for Service
Endpoint Interface(SEI).
• portName – is element portName
• targetNamespace – is XML namesp of WSDL & XML
elements generated from WebService

Mais conteúdo relacionado

Semelhante a web services-May 25.ppt

Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
Ponraj
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
Raveendra Bhat
 
Java Web services
Java Web servicesJava Web services
Java Web services
Sujit Kumar
 
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
Spiffy
 
Middleware in the cloud platform-v2
Middleware in the cloud   platform-v2Middleware in the cloud   platform-v2
Middleware in the cloud platform-v2
Hammad Rajjoub
 

Semelhante a web services-May 25.ppt (20)

Web services - A Practical Approach
Web services - A Practical ApproachWeb services - A Practical Approach
Web services - A Practical Approach
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NET
 
Windows 8 Metro apps and the outside world
Windows 8 Metro apps and the outside worldWindows 8 Metro apps and the outside world
Windows 8 Metro apps and the outside world
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web Services
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
Java Web services
Java Web servicesJava Web services
Java 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 service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
 
Building Web Services
Building Web ServicesBuilding Web Services
Building Web Services
 
Web-Server & It's Architecture.pptx
Web-Server & It's Architecture.pptxWeb-Server & It's Architecture.pptx
Web-Server & It's Architecture.pptx
 
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
MS TechDays 2011 - How to Run Middleware in the Cloud Story of Windows Azure ...
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web system
 
Managing Microservices With The Istio Service Mesh on Kubernetes
Managing Microservices With The Istio Service Mesh on KubernetesManaging Microservices With The Istio Service Mesh on Kubernetes
Managing Microservices With The Istio Service Mesh on Kubernetes
 
Web service
Web serviceWeb service
Web service
 
Middleware in the cloud platform-v2
Middleware in the cloud   platform-v2Middleware in the cloud   platform-v2
Middleware in the cloud platform-v2
 
Xml.ppt
Xml.pptXml.ppt
Xml.ppt
 
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database ConnectivityIT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Concepts
 
Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesDeveloping and Hosting SOAP Based Services
Developing and Hosting SOAP Based Services
 

Último

Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
ChloeMeadows1
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
lolsDocherty
 

Último (16)

Bug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's GuideBug Bounty Blueprint : A Beginner's Guide
Bug Bounty Blueprint : A Beginner's Guide
 
The Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case StudyThe Use of AI in Indonesia Election 2024: A Case Study
The Use of AI in Indonesia Election 2024: A Case Study
 
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWebiThome_CYBERSEC2024_Drive_Into_the_DarkWeb
iThome_CYBERSEC2024_Drive_Into_the_DarkWeb
 
Reggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirtsReggie miller choke t shirts
Reggie miller choke t shirtsReggie miller choke t shirts
 
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital PresenceCyber Security Services Unveiled: Strategies to Secure Your Digital Presence
Cyber Security Services Unveiled: Strategies to Secure Your Digital Presence
 
Premier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdfPremier Mobile App Development Agency in USA.pdf
Premier Mobile App Development Agency in USA.pdf
 
Topology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdfTopology of the Network class 8 .ppt pdf
Topology of the Network class 8 .ppt pdf
 
I’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 ShirtI’ll See Y’All Motherfuckers In Game 7 Shirt
I’ll See Y’All Motherfuckers In Game 7 Shirt
 
Pvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdfPvtaan Social media marketing proposal.pdf
Pvtaan Social media marketing proposal.pdf
 
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
TORTOGEL TELAH MENJADI SALAH SATU PLATFORM PERMAINAN PALING FAVORIT.
 
Development Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of appsDevelopment Lifecycle.pptx for the secure development of apps
Development Lifecycle.pptx for the secure development of apps
 
How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?How Do I Begin the Linksys Velop Setup Process?
How Do I Begin the Linksys Velop Setup Process?
 
Production 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptxProduction 2024 sunderland culture final - Copy.pptx
Production 2024 sunderland culture final - Copy.pptx
 
Thank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirtsThank You Luv I’ll Never Walk Alone Again T shirts
Thank You Luv I’ll Never Walk Alone Again T shirts
 
Statistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdfStatistical Analysis of DNS Latencies.pdf
Statistical Analysis of DNS Latencies.pdf
 
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkkaudience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
audience research (emma) 1.pptxkkkkkkkkkkkkkkkkk
 

web services-May 25.ppt

  • 2. WEB SERVICES: INTRODUCTION Web Service - Definition • A s/w component stored on one computer & accessed via method calls by an appln (or other s/w component) on another computer over n/w. • “a s/w s/m - to support interoperable m/c-to- m/c interaction over a n/w”
  • 3. How Web Service Works • A SOA is a collection of services. • services commn with each other & involve simple data passing , call 2 or more services – coord some activity. • service - is a function i.e., well-defined, self-contained & does not depend on context or state of other services. • Web services commn. using such techno. as XML and HTTP • Simple Object Access Protocol (SOAP) • XML-based protocol - allows web services & clients to comm. in a platform-independent manner.
  • 5. Web Services • Example: • Amazon, Google, eBay, PayPal & • applns available to partners via web services • Using WS, need less time develop new applns & create innovative new applns • 2 parties involved – • web service provider and • web service consumer.
  • 7. Web Services • Web Services is – App to app commn. – Interoperability b/w disparate systems. – Comm over network. – Exposed interface - platform indep & internal impl. is abstract. – Enables loosely coupled design. – Open protocol is used for establishing comm – Web services are self contained. • 2 categories of web services 1. SOAP Web Service 2. RESTful Web Service
  • 8. SOAP Web Service • is a std protocol spec for msg xchg based on XML. • Comm b/w WS & client happens using XML msgs. • It defines rules for comm like what tags are used in XML & their meaning.
  • 9. RESTful Web Service • RESTful web service uses archi - use HTTP or similar protocols by restricting interface to use std operations - GET, POST,… for HTTP.
  • 10. Comparision • REST services Architectural style Simply calls services via URL path Lightweight – no extra xml markup Easy to build – no toolkits required • SOAP services XML-based protocol Invokes services by calling RPC method Rigid – type checking, adheres to a contract Development tools – WSDL Soap analyser tool, oXygen XML
  • 11. COMPONENTS OF WEB SERVICES • Basic WS platform is XML + HTTP. • All std WS work using following components 1. SOAP (Simple Object Access Protocol) 2. UDDI (Universal Description, Discovery and Integration) 3. WSDL (Web Services Description Language)
  • 12. COMPONENTS OF WEB SERVICES • 1. SOAP • simple & lightweight - xchg struct. & typed info. b/w peers - decentralized, distri env. - using XML • 2. WSDL • is an xml file – describes WS in a m/c readable format. • specify Port / Endpt – URL of the web service • Input /output message format • Security protocol i.e., to be followed (like https) • 3. UDDI – Service Registry • defines a std way to desc WS, reg WS – in a well- known registry
  • 13. Advantages Of Web Services • Interoperability - distri. app that span diverse h/w & s/w platforms • Easy, widespread access to app thru firewalls using Web protocols • cross-plat, cross-lang data model (XML) - develop heterogeneous distri. App • Use of Std protocols & spec enables integ with other msg S/m, Legacy S/m, etc • Seamless Integ of B2B app
  • 14. Java Web Services Basics 1. Remote machine or server –computer - where WS resides – client app access WS - send a method call over a n/w to remote m/c – processes call & returns a resp over n/w to app 2. In Java, WS impl - as class that resides on a server 3. Publishing (deploying) a WS – Making a WS available to receive client req 4. Consuming a web service – Using WS from client app Consuming WS (client) has 2 parts: –obj of a proxy class - interact with WS –client app that consumes WS by invoking methods on proxy obj –proxy obj handles details of comm with WS on client‟s behalf
  • 15. JAX-WS 2.0 • Req to & resp from WS transmit via SOAP • Any client capable of generate & process SOAP msg can interact with a WS, regardless lang in which the WS is written
  • 16. Interaction between web service client and web service
  • 17. What are stubs? • is a small prg routine – substitutes longer prg to load later or located remotely. • stub accepts req & then fwds it to the remote procedure. • When procedure complete its service – returns results or other status to stub – • Stub passes it back to prg that made the req.
  • 18. Web Services Architecture • Web Services involve 3 major roles 1. Service Provider 2. Service Registry 3. Service Consumer • 3 major operations surround web services 1. Publishing – making a service available 2. Finding – locating web services 3. Binding – using web services
  • 21. Creating, Publishing, Testing & Describing Web Services • @WebService annotation – Indicates - class repre. WS – Optional element name - is the name of the proxy class i.e., generated for client – Optional element serviceName – is name of the class that client uses to obtain a proxy object.
  • 22. @WebMethod annotation • Optional operationName element - specify method name i.e., exposed to the web service client
  • 23. @WebParam annotation • Parameters of web methods r annotated - @WebParam annotation • @WebService annotation –used in generating WSDL file. • serviceName - same as WSDL ele. service • name - same as WSDL element <portType name> • endpointInterface - user defined name for Service Endpoint Interface(SEI). • portName – is element portName • targetNamespace – is XML namesp of WSDL & XML elements generated from WebService