Web services-Notes-1-2020
Web services-Notes-1-2020
Today,
Sun Java
RMI
(Remote
Method
Invocation), OMG CORBA (Common Object Request Broker Architecture), Microsoft DCOM
(Distributed Component Object Model), and Message-Oriented Middleware (MOM) have emerged
as the most common distributed computing technologies. These technologies, although different in
their basic architectural design
and implementation, address specific problems in their target environments.
The early years of distributed application architecture were dominated by two-tier business
applications. In a two-tier architecture model, the first (upper) tier handles the presentation and
business logic of the user applica-tion (client), and the second/lower tier handles the application
organization and its data storage (server). This approach is commonly called client-server
applications architecture.
The emergence of the Extensible Markup Language (XML) for defining portable data in a
structured and self-describing format is embraced by the industry as a communication medium for
electronic data exchange. Using XML as a data exchange mechanism between applications
promotes interoperability between applications and also enhances the scalability of the underlying
applications. Combining the potential of a J2EE platform and XML offers a standard framework for
B2B and inter-application communication across networks.
3) a. What are web services ? What are the major technical reasons for choosing web services
over web applications?
Web services are loosely coupled software components delivered over Internet standard
technologies. In short, Web services are self-describing and modular business applications that
expose the business logic as services over the Internet through programmable interfaces and using
Internet protocols for the purpose of providing ways to find, subscribe, and invoke those services.
Major technical reasons:
Traditionally, Web applications enable interaction between an end user and a Web site, while Web
services are service-oriented and enable applicationto-application communication over the Internet
and easy accessibility to heterogeneous applications and devices. The following are the major tech-
nical reasons for choosing Web services over Web applications:
1. Web services can be invoked through XML-based RPC mechanisms across firewalls.
2. Web services provide a cross-platform, cross-language solution based on XML messaging.
3. Web services facilitate ease of application integration using a lightweight infrastructure without
affecting scalability.
4. Web services enable interoperability among heterogeneous applications.
b. What are the key benefits and challenges associated with web services?
The key benefits of implementing Web services are as follows:
1. Provides a simple mechanism for applications to become services that are accessible by anyone,
anywhere, and from any device.
2. Defines service-based application connectivity facilitating EAI, and intra-enterprise and inter-
enterprise communication.
3. Defines a solution for businesses, which require flexibility and agility in application-to-
application communication over the Internet.
4. Enables dynamic location and invocation of services through service brokers (registries).
5. Enables collaboration with existing applications that are modeled as services to provide
aggregated Web services.
Known Challenges in Web Services
1. Distributed transactions. If the environment requires distributed transactions with heterogeneous
resources, it should be studied and tested with standard solutions based on BTP, WS-Transactions,
and WS-Coordination.
2. Quality of Service (QoS). In case of a mission-critical solution, the service providers must
examine the reliability and performance of the service in peak load and uncertain conditions for
high availability. The exposed infrastructure must provide load balancing, and failover and fault
tolerance, to resolve these scenarios.
3. Security. Web services are exposed to the public using http-based protocols. As Web services is
publicly available, it must be implemented using authentication and authorization mechanisms and
using SSLenabling encryption of the messages for securing the usage. Adopting open security
standards like SAML, XML Encryption, XML Signature, or XACML may be a solution.
SOAP Communication
SOAP is designed to communicate between applications independent of the underlying platforms
and programming languages. To enable communication between SOAP nodes, SOAP supports the
following two types of communication models:
SOAP RPC. It defines a remote procedural call-based synchronous communication where the
SOAP nodes send and receive messages using request and response methods and exchange
parameters and then return the values.
The SOAP RPC representation defines a tightly coupled communication model based on requests
and responses.
SOAP Messaging. It defines a document-driven communication where SOAP nodes send and
receive XML-based documents using synchronous and asynchronous messaging.
SOAP Messaging represents a loosely coupled communication model based on message notification
and the exchange of XML documents. The SOAP message body is represented by XML documents
or literals encoded according to a specific W3C XML schema, and it is produced and con-
sumed by sending or receiving SOAP node(s).
b. Explain how a structure and an integer with a range check are encoded in SOAP?