SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Similaire à web services-May 25.ppt

Web services - A Practical Approach
Web services - A Practical ApproachWeb services - A Practical Approach
Web services - A Practical ApproachMadhaiyan Muthu
 
Web Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETWeb Service Implementation Using ASP.NET
Web Service Implementation Using ASP.NETPonraj
 
Welcome to Web Services
Welcome to Web ServicesWelcome to Web Services
Welcome to Web ServicesShivinder Kaur
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overviewRaveendra Bhat
 
Java Web services
Java Web servicesJava Web services
Java Web servicesSujit Kumar
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service IntroductionMadhukar Kumar
 
Web-Server & It's Architecture.pptx
Web-Server & It's Architecture.pptxWeb-Server & It's Architecture.pptx
Web-Server & It's Architecture.pptxAlokKumar250045
 
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
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web systemhashim102
 
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 KubernetesIftach Schonbaum
 
Middleware in the cloud platform-v2
Middleware in the cloud   platform-v2Middleware in the cloud   platform-v2
Middleware in the cloud platform-v2Hammad Rajjoub
 
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 Connectivitypkaviya
 
Web services Concepts
Web services ConceptsWeb services Concepts
Web services Conceptspasam suresh
 
Developing and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesDeveloping and Hosting SOAP Based Services
Developing and Hosting SOAP Based ServicesStephenKardian
 

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

Dernier

VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewingbigorange77
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Paul Calvano
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMartaLoveguard
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Lucknow
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 

Dernier (20)

VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
 
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in  Rk Puram 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Rk Puram 🔝 9953056974 🔝 Delhi escort Service
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Denver Web Design brochure for public viewing
Denver Web Design brochure for public viewingDenver Web Design brochure for public viewing
Denver Web Design brochure for public viewing
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24Font Performance - NYC WebPerf Meetup April '24
Font Performance - NYC WebPerf Meetup April '24
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
Magic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptxMagic exist by Marta Loveguard - presentation.pptx
Magic exist by Marta Loveguard - presentation.pptx
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja VipCall Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
Call Girls Service Adil Nagar 7001305949 Need escorts Service Pooja Vip
 
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Samaira 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Samaira 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 

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