Más contenido relacionado
La actualidad más candente (20)
Similar a SpringPeople Introduction to JAVA Web Services (20)
SpringPeople Introduction to JAVA Web Services
- 1. © SpringPeople Software Private Limited, All Rights Reserved.© SpringPeople Software Private Limited, All Rights Reserved.
Introduction to JAVA Web
Services
- 2. © SpringPeople Software Private Limited, All Rights Reserved.
What are Web Services?
• Web Services are used to build interoperable distributed services across
different platform.
– The client and server can be developed on different platforms and in
different languages, yet they can exchange requests and responses.
– For example, a Java client can consume a .NET based service and vice-
versa
• Legacy or new systems can be integrated rather easily by exposing them as
web services.
– A better ROI from every system can be achieved.
- 4. © SpringPeople Software Private Limited, All Rights Reserved.
Distributed Architecture Examples
• Java Platform
– RMI (Remote Method Invocation), EJB (Enterprise Java
Beans), CORBA, now not so famous
• @Remote interface as the interface
• @SessionBean as implementation
• JNDI Directory as the registry
• JBoss as the service container & publisher
• InitialContext.lookup() for fetching proxy on the client side
• COM/DCOM on Microsoft platform
- 5. © SpringPeople Software Private Limited, All Rights Reserved.
Major Shortcomings of
Distributed System
•Both client and server must be on the same platform
Clients on other platforms can not utilize the services
Changes in server-side environment affect all the clients
•Client must have server side API for interaction
Client can not be developed unless the API is distributed
Often the API may be priced, poorly documented and etc.,
•The protocol between client and server is also platform specific
and often proprietary
Client that wants to connect to several remote objects have to implement
all the specified protocols
- 7. © SpringPeople Software Private Limited, All Rights Reserved.
Web Services Standards
• Web Services are build on three foundation standards
– Web Service Definition Language (WSDL): An XML based IDL to
describe the service definitions in a language agnostic way
– Service Oriented Architecture Protocol (SOAP): An XML based PDU for
communication between the clients and services
– Universal Description Discovery and Integration (UDDI): An XML based
registry for service publication and discovery
• Bodies like OASIS proposed and publicized other standards as well
– Standards like WS-Address, WS-Security, WS-Authentication and etc.,
are built on top of foundation standards
- 8. © SpringPeople Software Private Limited, All Rights Reserved.
Web Service Definition Language
(WSDL)
What is WSDL?
• Its an IDL for describing a web service interface.
• The service is meant for the clients of any platform.
• Its XML based.
Who develops them?
• WSDL is hand-written in Contract-First Approach
• WSDL is generated in Contract-Last Approach
- 9. © SpringPeople Software Private Limited, All Rights Reserved.
What WSDL consists of?
An abstract section
• Types: Describes the XML types & elements that are used in the messages
to/from the web services.
• Messages: Describes the input, output and fault messages that comes into
and goes out of web service operations.
• PortType: Names the web service and describes the operations offered by
the web service
A concrete section
• Bindings: Describes the transport protocol like HTTP to carry the SOAP
envelope for communicating with web service.
• Service: Describes the endpoint where the service is really available for
consumption
- 10. © SpringPeople Software Private Limited, All Rights Reserved.
SOAP/XML
What is SOAP?
• It stands for Service Oriented Architecture Protocol in the
SOA/Web Services combination.
– It originally stood for Simple Object Access Protocol when web
services were merely meant for lightweight RPC calls.
What is its job?
• It carries the payload for request/response between the client
and the server.
– Obviously its an XML document (JSON is also supported)
- 11. © SpringPeople Software Private Limited, All Rights Reserved.
Who writes and consumes
SOAP/XML?
• Web Service clients/servers dynamically prepares and
consumes the SOAP envelopes
- 12. © SpringPeople Software Private Limited, All Rights Reserved.
Who carries SOAP and what it
consist of?
• HTTP or protocol (as specified in WSDL) carries it
• It consists of optional Header and mandatory Body
- 13. © SpringPeople Software Private Limited, All Rights Reserved.
Web Services v/s SOA
•Web Services is one of the technologies to implement Service Oriented
Architectures (SOA)
However, Web Services predates SOA.
Primary intention of web services was to make RPC calls, later it
became a technology of choice for SOA implementation
•Clients can be developed as an orchestration of services from various
endpoints that confirms to SOA
Business processes can be delivered in accordance with Software As
A Service (SAAS) paradigm.
Services needs not be installed at client site, they are just consumed.
- 14. © SpringPeople Software Private Limited, All Rights Reserved.
Become a Web Services Expert In
3 Days Flat
Attend the 3-Days “Web Services Workshop”
View Complete Details
- 15. © SpringPeople Software Private Limited, All Rights Reserved.
Who will benefit?
Developers and Programmers, who wish to build interoperable distributed
services across different platform.
View Complete Details
- 16. © SpringPeople Software Private Limited, All Rights Reserved.
Q & A
training@springpeople.com
+91 80 65679700
www.springpeople.com
A SpringSource Certified Partner and
VMware Authorized Training Center