01- introduction to xml web services
TRANSCRIPT
Need of XML Web Service
Dr. Khalil AJAMIDr. Khalil AJAMI
Dr Khalil AJAMI DA: XML Web Services 2
Evolution of Distributed Applications
A Distributed Application is an application which has: Processing Requirements; Data Storage Requirements; Transparency Requirements Naming Requirements; Reusability Requirements; Security Requirements: Confidentiality, Integrity, Availability
When using Distributed Computing: Reducing Cost: (Servers Distributed) & (Clients Thin) Resolving Ownership of Data Issues
Grid Computing
Dr Khalil AJAMI DA: XML Web Services 3
Main Technical Issues with Distributed ApplicationsDifferent data types: Different operating systems support different data types.
Server Failures: We must consider how to handle server failures and loss of server response.
Client Failures: If a server is storing state on behalf of a client, and the client fails, then we must
consider how the server will be notified.
Connection Failures: If a method is called to purchase a large order of stock, and if the server received the
request to place the order but the response was lost, then it would not be acceptable to resubmit the purchase order.
Security: Prevention, Detection, Reaction Authentication & Authorization; Communication Security; Man-in-the-Middle attack Avoidance; Denial-of-service attack Avoidance.
Dr Khalil AJAMI DA: XML Web Services 4
RPC-Based Architecture
A remote procedure call (RPC) is a call made to a procedure or function that resides on a remote system.
It provides both:Location transparencyA familiar programming model
Dr Khalil AJAMI DA: XML Web Services 5
Problems with RPC-Based Architecture
Synchronous function Calls: The thread of execution is blocked until the function
returns.
For most developers, this is a very comfortable programming model.
However, layering a synchronous model on top of a distributed architecture introduces some problems.
Dr Khalil AJAMI DA: XML Web Services 6
Problems with RPC-Based Architecture
Building redundancy Load balancing and failover Issues with hard coded endpoints:
Discovering information needed to connect to an endpoint (Service)? Hard-coding the endpoint information.
Difficult to build redundancy and failover capabilities with Hard-Coded Addresses.
No simple way for an RPC-based application to do any form of dynamic load balancing
Services Availability Issues
No Prioritization: All requests by default are handled on a first-come, first-serve basis.
Dr Khalil AJAMI DA: XML Web Services 7
Message-Based Architectures
Message-Oriented Middleware provides applications with inter-process communication services by using message queuing technology as the basis for a guaranteed service level for critical applications.
The queuing technology tracks a message along each leg of its route, much like delivery services for a commercial package company performs package tracking.
This queuing technology ensures that any problem can be quickly detected, and possibly even corrected, without user intervention.
The most evident features of message-based architectures are that they are asynchronous and that they are based on the exchange of messages rather than function calls. Both of these features have some advantages, such as: Messages can be routed based on load and priority. Asynchronous calls allow clients to do productive work while waiting for a time-
consuming operation.
Dr Khalil AJAMI DA: XML Web Services 8
Problems with Message-Based Architectures
Message payload processing: Packing and unpacking of the message contents. After unpacking the message contents, the application must still validate the
contents. As the complexity and flexibility of the message payload increases,
unpacking and validating messages becomes more difficult.
Interoperability: Most message-based systems are implemented by using proprietary
message-queuing products.
Workflows and message sequencing: Because messages are sent asynchronously, it is possible that messages may
arrive out of order. This means that the application developer has the additional burden of
creating a high-level protocol layer on top of the messaging protocol to track the sequence of messages.
Dr Khalil AJAMI DA: XML Web Services 9
Web Standards
Both RPC-based and message-based architectures have been successfully implemented by many organizations
but these architectures suffer from a number of problems.
Dr Khalil AJAMI DA: XML Web Services 10
Problems with Binary Protocols
Distributed object models such as suffer from the limitation of relying on binary protocols. :Distributed Component Object Model (DCOM)Java Remote Method Invocation (RMI)Common Object Request Broker Architecture
(CORBA)
Some of the problems inherent in using binary protocols include:
Dr Khalil AJAMI DA: XML Web Services 11
Problems with Binary ProtocolsFirewalls: Binary protocols are point-to-point. Any communication with an endpoint that is inside a firewall requires
firewall administrators to open up a range of ports to allow communication. For most organizations, this is an unacceptable security risk.
Interoperability between disparate object models: The result is that most organizations use a single object model to implement
all of their systems within an organization. Consequently, the environment of distributed applications is divided into
different groups that are identified by the object model that each group has adopted.
If a potential trading partner chooses a competing object model, this can cause significant problems.
Data Formats: Every protocol encodes data differently, which places a huge overhead on
organizations when they have to consume data that was encoded in multiple, incompatible ways.
Dr Khalil AJAMI DA: XML Web Services 12
Solutions
Web Protocols and Data Formats:HTTP: Interoperability, Firewall FriendlyHTMLXML: Universal Data Format
Two major Problems:SecurityPerformance
Dr Khalil AJAMI DA: XML Web Services 13
Web Services ?
Web service:URL addressable set of functionality Functionality exposed over a network to serve as a
building block for creating distributed applications.
Example: Microsoft Passport. Passport provides authentication services All of its functionality is accessible through HTTP
requests.
Dr Khalil AJAMI DA: XML Web Services 14
What can I do with XML Web services?
A whole class of applications that could be built to analyze and aggregate the information you care about and present it to you in a variety of ways;
Microsoft® Excel spreadsheet that summarizes my whole financial picture: stocks, bank accounts, etc.
Through XML Web services, Excel can update it continuously.
Most of this information is available now on the Web, but XML Web services will make programmatic access to it easier and more reliable
Dr Khalil AJAMI DA: XML Web Services 15
What can I do with XML Web services?Car Rental Company – Interoperability with Key Partner
Background: A major airline approached the car rental company about
putting a link to the car reservation system on the airline’s Web site.
Linking the two proprietary reservation systems presented an extreme challenge.
Solution: The car rental company created a translation engine for
sending data between the two systems.
Business Benefits: Car rental company developed another large sales channel Solution got to market quickly
Dr Khalil AJAMI DA: XML Web Services 16
What can I do with XML Web services?
Purchasing application to:automatically obtain price information from a variety
of vendors, allow the user to select a vendor, submit the order
and then track the shipment until it is received.
Vendor application Using XML Web services To check the customer's credit, To charge the customer's account To set up the shipment with a shipping company
Dr Khalil AJAMI DA: XML Web Services 17
What can I do with XML Web services?
one of the services that XML Web Services would make possible is a calendar service:
If many persons exposed their calendars through this XML Web service
Each can schedule appointments with the others on line
Others could schedule appointments directly in your calendar if you like.
Dr Khalil AJAMI DA: XML Web Services 18
In what areas will XML Web services be most effective
6%
15%
24%
33%
33%
70%
Other
ERP
B-to-C eCommerce
CRM
Supply Chain
B-to-B eCommerce
Dr Khalil AJAMI DA: XML Web Services 19
What Is an XML Web Service ?
XML Web services architecture:Allows programs written in different languages On different platforms To communicate with each other In a standards-based way
Is It Really different??????
Dr Khalil AJAMI DA: XML Web Services 20
What Is an XML Web Service ?Distributed computing on the Internet
Various sources that work together regardless of where they reside or how they were implemented
Three main Characteristics: Expose useful functionality to Web users (Developers) through a
standard Web protocol (SOAP). Provide a way to describe their interfaces in enough detail to allow
a user to build a client application to talk to them Web Services Description Language (WSDL).
Are registered so that potential users can find them easily Universal Discovery Description and Integration (UDDI).
Dr Khalil AJAMI DA: XML Web Services 21
Foundations of Web Services
The foundations for Web services are: HTTP XMLSimple Object Access Protocol (SOAP, a lightweight
HTTP- and XML-based protocol that is used for information exchange).
The development of these technologies is governed by the World Wide Web Consortium (W3C).
Dr Khalil AJAMI DA: XML Web Services 22
WS Building BlocksLike components, Web services are black boxes.
They encapsulate the implementation and provide an interface for communicating with the Web service.
Therefore, you can use Web services as building blocks for applications.
There is no restriction on the granularity of a Web service. It can range from simple components such as an order-tracking component published by a shipping company to large applications such as hosted financial applications.
Dr Khalil AJAMI DA: XML Web Services 23
Aggregating Web ServicesA Web service can aggregate other Web services to provide a sophisticated set of services. For example, a Web service for a real-estate agency might
make use of a Web service for a credit verification to facilitate approval of online loan applications.
In the future, more and more distributed applications will be built from Web services. In such applications, Web services will often be selected at run
time based on different metrics, such as availability, cost, performance, and quality.
This level of choice will be invaluable in designing redundant systems with failover capabilities.
Dr Khalil AJAMI DA: XML Web Services 24
Characteristics of Web ServicesInteroperability: Any Web service can interoperate with any other Web service. Web services are intended to be invoked by using SOAP. SOAP is platform neutral, developers must no longer figure out how to
build bridges between DCOM, CORBA, and other disparate protocols. Because Web services communicate by using HTTP and XML, any
network node, which supports these technologies, can both host and access Web services.
Multilanguage support: Developers can write Web services in any language. Consequently, developers need not learn new languages or standardize on a
single language to create or consume Web services.
Dr Khalil AJAMI DA: XML Web Services 25
Characteristics of Web ServicesReusing existing Applications: It is very easy to expose existing components and libraries as Web services. Vendors, like Microsoft, provide tools to make the task of exposing
components and libraries even easier. Most companies have a large number of existing components, libraries, and
applications. It may be more cost effective to reuse the functionality in these software
resources than to re-implement them. Applications
Use of Industry Standards: All of the major vendors are supporting technologies that are related to
Web services, specifically, HTTP, XML, and SOAP. The universal support for these standards is unprecedented. This kind of support will make it very easy for heterogeneous systems to
communicate. For example, a component that is written in C# and exported as a Web
service can easily be used by a Common Gateway Interface (CGI) application that is written in C++, if that application were to make a SOAP request and process the result appropriately. supported standards
Dr Khalil AJAMI DA: XML Web Services 26
Application Service Providers (ASP)
Dr Khalil AJAMI DA: XML Web Services 27
Application Service Providers (ASP)
From a subscribers perspective, the following are the characteristics of hosted applications: The application that the ASP hosts is viewed as a portal. The application that the ASP hosts exists in an isolated environment. Each subscriber has their own instance of the application. Subscribers do not share data with other subscribers.
From an ASP perspective, all hosted applications must meet at least the following criteria: Application instances must be separately configurable for each subscriber,
even on shared hardware. This includes security settings. Applications must have mechanisms for measuring the duration of use of
an application for billing purposes.