SlideShare a Scribd company logo
1 of 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

More Related Content

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

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

Recently uploaded

Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012rehmti665
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作ys8omjxb
 
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
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一Fs
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一Fs
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Dana Luther
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Excelmac1
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Sonam Pathan
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationLinaWolf1
 
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
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一Fs
 
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
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一Fs
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhimiss dipika
 

Recently uploaded (20)

Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
Call Girls South Delhi Delhi reach out to us at ☎ 9711199012
 
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
Potsdam FH学位证,波茨坦应用技术大学毕业证书1:1制作
 
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
 
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
 
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
定制(Lincoln毕业证书)新西兰林肯大学毕业证成绩单原版一比一
 
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
定制(AUT毕业证书)新西兰奥克兰理工大学毕业证成绩单原版一比一
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
Packaging the Monolith - PHP Tek 2024 (Breaking it down one bite at a time)
 
Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...Blepharitis inflammation of eyelid symptoms cause everything included along w...
Blepharitis inflammation of eyelid symptoms cause everything included along w...
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170Call Girls Near The Suryaa Hotel New Delhi 9873777170
Call Girls Near The Suryaa Hotel New Delhi 9873777170
 
PHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 DocumentationPHP-based rendering of TYPO3 Documentation
PHP-based rendering of TYPO3 Documentation
 
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🔝
 
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
定制(Management毕业证书)新加坡管理大学毕业证成绩单原版一比一
 
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)
 
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
定制(UAL学位证)英国伦敦艺术大学毕业证成绩单原版一比一
 
Contact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New DelhiContact Rya Baby for Call Girls New Delhi
Contact Rya Baby for Call Girls New Delhi
 

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