Lect01 Introduction WS SOA
Lect01 Introduction WS SOA
JB DB Application
Clients JB Client
Checking
Accounts
Web Server
NCB ATM
Application NCB DB
Web Server
Two Banks Example (Using Other Bank’s ATM)
JB ATM
JB DB Application
Clients
Checking
JB Client
Accounts
Web Server
NCB ATM
Application NCB DB
Web Server
Two Banks Example
Using Other Bank’s ATM (indirect connection)
JB ATM
JB DB Application
Clients NCB Client
Checking
Accounts
Web Server
NCB ATM
Application NCB DB
Clients
Checking
Accounts
Web Server
UDDI Registry XML Document (WSDL)
Return Type
Address4| WSDL4 (XML)
End Point URL
work? WSDL
ABC Java app.
CPP app (Client)
SOAP
REQUEST CalService Class
STUB/PROXY HTTP
int result=o.add(10,10); Public add(int i,int j)
{ return i+j }
SOAP Skeleton
RESPONSE
SERVER
How Web Services Work? cont.
• A client application sends a request to a web service.
• The web service receives the request and processes it.
• The web service then sends a response back to the client application.
• The client application receives the response and processes it.
Advantages of Web Services
• Web services exchange data in XML or JSON format which are very
lightweight and universally supported
• In web services also data exchange happened under HTTP which is a
reliable, established and secure protocol.
• SOAP protocol is XML based messaging protocol which is standard as
well as cross platform.
• We can publish our web services very easily using UDDI.
• New Language called Web Service Description Language is used to
describe behavior of web services which contain the structure of
input request and output response.
Web Services Standards
• XML (Extensible Markup Language): XML is a markup language used
to describe data in a structured format. It is widely used in web
services to exchange data between different systems.
• SOAP (Simple Object Access Protocol): SOAP is a messaging
protocol used to exchange structured information between different
applications. It uses XML as its message format and is often used in
enterprise-level web services.
• WSDL (Web Services Description Language): WSDL is an XML-based
language used to describe the functionality of a web service. It
provides a description of the available operations, the input and
output parameters, and the communication protocol used.
Web Services Standards cont.
• UDDI (Universal Description, Discovery and Integration): UDDI is a
platform-independent, XML-based registry that provides a way for
businesses to publish and discover web services. It allows businesses to
advertise their services and for other businesses to discover and use them.
• REST (Representational State Transfer): REST is a software architecture for
creating web services. It uses HTTP as its communication protocol and is
often used for web applications that require high scalability, flexibility, and
performance.
• JSON (JavaScript Object Notation): JSON is a lightweight data interchange
format that is easy for humans to read and write, and easy for machines to
parse and generate. It is often used in RESTful web services.
Types of Web Services
• There Mainly two types of web services:
• SOAP web service
• Rest Web Service
Key topics to be covered
• WSDL (Web Services Description Language)
• SOAP (Simple Object Access Protocol)
• UDDI Registries
• XML
• Using NetBeans to create and consume web services.
• REST Architecture
• SOAP vs. REST
Service Oriented Architecture (SOA)
• SOA is a logical way of designing a software system to provide
services to either end-user applications or to other services
distributed in a network, via published and discoverable interfaces.
• Each service is discoverable and accessible through standard
interfaces and messaging protocols.
• This architectural approach is particularly applicable when multiple
applications running on varied technologies and platforms need to
communicate with each other.
Service Oriented Architecture cont.
• SOA is based on the principle of separating functionality into
independent, reusable services that can be combined to create larger
applications.
• Each service is designed to perform a specific task or function, and
can be accessed and used by other services or applications through
a standardized interface.
• This allows for greater flexibility, scalability, and reusability of
software components.
Service Oriented Architecture cont.
• SOA typically relies on web services technology to enable
communication between different software components.
• Web services use open standards such as XML, SOAP, and WSDL to
define service interfaces and exchange data between services
SOA Benefits
• Reusability: Services can be reused across different applications,
reducing development time and costs.
• Interoperability: Services can be used across different platforms and
technologies, allowing for greater flexibility and integration with other
systems.
• Scalability: Services can be easily scaled up or down to meet changing
business requirements.
• Modularity: Services can be developed and maintained
independently, making it easier to manage and update them over
time.
• Agility: SOA enables organizations to quickly respond to changes
in business requirements by easily reconfiguring and reusing services.
Building Blocks of SOA
• Web services provider
Web services provider is the organization that owns the Web service. Providers
are responsible for publishing a description of the service(s) they provide on a
services registry
• Web services requestor (Client)
From a business perspective this is the enterprise that requires certain functions
to be satisfied. From an architectural perspective, this is the application that is
looking for, and subsequently invoking, the service. The Web services requestor
searches the service registry for the desired Web services.
• Web services registry
Web services registry, which is a searchable directory where service descriptions
can be published and searched. Service requestors find service descriptions in
the registry and obtain binding information for services.
Operations in the SOA
1. The publish operation
• Publishing a Web service so that other users or applications can find it
actually consists of two equally important operations.
• The first operation is describing the Web service itself using WSDL
(business information, service information and technical information);
• the other is the actual registration of the Web service; registration
deals with storing the three basic categories of descriptive
information about a service in the Web services registry. For Web
services requestors to be able to find a Web service.
Operations in the SOA cont.
2. The find operation
• Finding the desired Web services consists of first discovering the
services in the registry and then selecting the desired Web service(s)
from the search results.
3. The bind operation
• The most important operation is the actual invocation of the Web
services. During the binding operation the service requestor invokes
or initiates an interaction at run-time using the binding details in the
service description to locate and contract to the service.
Operations in the SOA cont.
Questions and Discussion
• If you have any questions or would like to
discuss web services, please feel free to ask.
I would be happy to help.