Upload
springpeople
View
223
Download
0
Embed Size (px)
Citation preview
7/28/2019 SpringPeople Introduction to JAVA Web Services
1/16
SpringPeople Software Private Limited, All Rights Reserved.
SpringPeople Software Private Limited, All Rights Reserved.
Introduction to JAVA Web
Services
7/28/2019 SpringPeople Introduction to JAVA Web Services
2/16
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.
7/28/2019 SpringPeople Introduction to JAVA Web Services
3/16
SpringPeople Software Private Limited, All Rights Reserved.
Typical Distributed Architecture
7/28/2019 SpringPeople Introduction to JAVA Web Services
4/16
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
7/28/2019 SpringPeople Introduction to JAVA Web Services
5/16
SpringPeople Software Private Limited, All Rights Reserved.
Major Shortcomings of
Distributed System
Both client and server must be on the same platformClients on other platforms can not utilize the services
Changes in server-side environment affect all the clients
Client must have server side API for interactionClient 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 proprietaryClient that wants to connect to several remote objects have to implement
all the specified protocols
7/28/2019 SpringPeople Introduction to JAVA Web Services
6/16
SpringPeople Software Private Limited, All Rights Reserved.
Web Service Architecture
Solution
7/28/2019 SpringPeople Introduction to JAVA Web Services
7/16 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
7/28/2019 SpringPeople Introduction to JAVA Web Services
8/16 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
7/28/2019 SpringPeople Introduction to JAVA Web Services
9/16 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
7/28/2019 SpringPeople Introduction to JAVA Web Services
10/16 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)
7/28/2019 SpringPeople Introduction to JAVA Web Services
11/16
SpringPeople Software Private Limited, All Rights Reserved.
Who writes and consumes
SOAP/XML? Web Service clients/servers dynamically prepares and
consumes the SOAP envelopes
7/28/2019 SpringPeople Introduction to JAVA Web Services
12/16
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
7/28/2019 SpringPeople Introduction to JAVA Web Services
13/16
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.
7/28/2019 SpringPeople Introduction to JAVA Web Services
14/16
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
http://www.springpeople.com/courses/regular/web-services-training-course.phphttp://www.springpeople.com/courses/regular/web-services-training-course.php7/28/2019 SpringPeople Introduction to JAVA Web Services
15/16
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
http://www.springpeople.com/courses/regular/web-services-training-course.phphttp://www.springpeople.com/courses/regular/web-services-training-course.php7/28/2019 SpringPeople Introduction to JAVA Web Services
16/16
SpringPeople Software Private Limited, All Rights Reserved.
Q & A
+91 80 65679700www.springpeople.com
A SpringSource Certified Partner and
VMware Authorized Training Center
mailto:[email protected]://www.springpeople.com/http://www.springpeople.com/mailto:[email protected]