Professional Documents
Culture Documents
1
MC5012/ Service Oriented Architecture MCA 2019-2020
C305.2: Able to apply SOAP , HTTP and UDDI services in the web applications
C305.3: Able to apply SOA architecture and the underlying design principles for the web
projects
C305.4: Able to understand the role of SOA in J2EE and .NET.
C305.5: Able to know the cloud computing architecture and the types of clouds
MAPPING BETWEEN COs, POs AND PSOs
PROGRAMME OUTCOMES (POs) PSOs
COs
PO1 P02 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
C305.1 1 1 1 1 - - 3 - 1 1 1 1 2 1
C305.2 1 1 1 1 - - 3 - 1 1 1 1 1 1
C305.3 1 2 2 - 1 - 1 1 3 2 2 1 2 3
C305.4 1 2 2 1 1 1 1 1 2 2 2 2 2 2
C305.5 1 1 1 1 1 1 1 1 2 1 2 2 2 2
2
MC5012/ Service Oriented Architecture MCA 2019-2020
PART-A
UNIT-I
1. Define SOA.
SOA is an architectural style that supports service-orientation.
SOA is a style of design that guides all aspects of creating and using business services
throughout their life cycle.
It allows different applications to exchange data and participate in business processes.
3
MC5012/ Service Oriented Architecture MCA 2019-2020
4
MC5012/ Service Oriented Architecture MCA 2019-2020
A service represents a logically grouped set of operations capable of performing the related
units of work. Services communicate via SOAP messages.
11. How is SOA different from distributed internet architecture?
SOA introduces processing and security requirements that differ from distributed internet
architecture and SOA administration is typically more complex due to its reliance on
message-based communication.
12. List the components SOA / What are fundamental parts of SOA framework. / What is
the role of messages in SOA (Nov 2017, Nov 2018, April 2019)
SOAP messages- contains data for operation
Web service operations-holds the logic required to process messages
Web services- processing logic, logically grouped set of operations
Processes / Activities - automation logic, large units of work that requires the completion of
smaller units of work.
13. List out the types of service autonomy? (Nov 2016)
Service level autonomy: Service boundaries are distinct from each other but the service may
share underlying resources.
Pure autonomy: The underlying logic is under complete control and ownership of the service.
14. What is a service contract?
Service contract provides a formal definition of
Service endpoint.
Each service operation.
Every input and output message supported by each service operation.
Rules and characteristics of the service and its operations.
15. Define a process.
A process contains the business rules that determine the service operations used to complete a
unit of automation.
16. What do you mean by the term “separation of concerns”?
This theory is based on the notion that it is beneficial to break down a large problem into a
series of individual concerns. This allows logic required to solve the problem to be
decomposed into a collection of smaller related pieces. Each piece of logic addresses a
specific concern.
17. What does contemporary SOA represent?
An open, extensible, federated, composable architecture that promotes service-orientation
and is composed of autonomous, QoS-capable, vendor diverse, interoperable, discoverable
and potentially reusable services implemented as web services.
18. Compare 2-tier with 3-tier architecture.(Jan ’16)
The two-tier is based on Client Server architecture. The two-tier architecture is like client
server application. The direct communication takes place between client and server. There is
no intermediate between client and server. Because of tight coupling a 2 tiered application
will run faster.
Three-tier architecture typically comprise a presentation tier, a business or data access tier,
and a data tier. Three layers in the three tier architecture are as follows:
1) Client layer
2) Business layer
3) Data layer
19. Define a web service. Write any two example web service. (Jan ‘ 16)
5
MC5012/ Service Oriented Architecture MCA 2019-2020
Web services are open standard (XML, SOAP, HTTP etc.) based Web applications that
interact with other web applications for the purpose of exchanging data.
Web Services can convert your existing applications into Web-applications.
20. Summarize the business benefits of SOA? (Nov 2016)
Improved integration and intrinsic interoperability
Inherent reuse
Streamlined architectures and solutions
Leveraging of legacy investment
Establishing standardized XML data representation
Focused investment on communication infrastructure
Best of breed alternatives
Organizational agility
Unit – II
1. List some advantages of XML. / What are the benefits of giving an XML element
Simplicity - XML files are human readable
Openness - Widespread industry support
Extensibility – There is no fixed set of tags. New tags can be created as they are
needed (User defined tags).
Major relational databases have the native capability to read and generate XML data
Large family of XML support technologies is available
2. Write the three revolutions of XML.
Data revolution
Architectural revolution
Software revolution
3. What is XML? / How elements are represented in an XML file (Nov 2017/Nov 2018)
XML elements identify the type of information, or content that is placed within a specific
section of the XML document. An XML element is everything from (including) the
element's start tag to (including) the element's end tag.
An element can contain:
other elements
text
attributes
or a mix of all of the above...
4. List the characteristics of XML attributes
Attributes cannot contain multiple values (child elements can)
Attributes are not easily expandable (for future changes)
Attributes cannot describe structures (child elements can)
Attributes are more difficult to manipulate by program code
Attribute values are not easy to test against a Document Type Definition (DTD) -
which is used to define the legal elements of an XML document
5. What are the features of XML?
XML stands for Extensible Markup Language
XML is a markup language much like HTML
XML was designed to describe data
XML tags are not predefined. You must define your own tags
6
MC5012/ Service Oriented Architecture MCA 2019-2020
XML uses a Document Type Definition (DTD) or an XML Schema to describe the
data
XML with a DTD or XML Schema is designed to be self-descriptive
XML is a W3C Recommendation.
6. Define web services and write any two examples web services?
Web services provide a framework for communication across the web. It is both a set of
protocols and process for discovery and connection. The framework provides protocols and
process for providers to register and clients to discover and use web based services.
Two Example Web services:
Service Provider or Publisher: This is the provider of the web service. The service provider
implements the service and makes it available on the Internet or intranet.
Service Requestor or Consumer: This is any consumer of the web service. The requestor
utilizes an existing web service by opening a network connection and sending an XML request.
7. What is XML document?
Extensible Markup Language (XML) is a markup language that defines a set of rules for
encoding documents in a format which is both human-readable and machine-readable. These
include vector graphics, e-commerce transactions, mathematical equations, object meta-data,
server APIs, and a thousand other kinds of structured information.
8. Compare XML and HTML
XML HTML
XML was designed to describe data, with HTML was designed to display data, with
focus on what data is focus on how data looks
HTML is about displaying information XML is about carrying information
User defined tags Pre-defined tags
11. Write the concept of web services
• We have the following structure:
HTTP SOAP
Client at ------> Associate ---------> Amazon
browser <----- site < --------
HTML XML
• A client makes an ordinary web request to the Associate site which makes a SOAP
request to Amazon.
• Amazon replies with basic XML data which the Associate site converts into HTML
before sending it back to the client.
• The information seen by the client has the ‘look and feel’ of the Associate site. They may
be unaware of the involvement of Amazon
12. Write the parts of XSL.
XSL consists of three parts:
XSLT - a language for transforming XML documents
XPath - a language for navigating in XML documents
XSL-FO - a language for formatting XML documents
13. Define the term DTD.
A Document Type Definition (DTD) defines the legal building blocks of an XML
document. It defines the document structure with a list of legal elements and attributes. A
DTD can be declared inside an XML document or in an external file.
14. What is XML presentation technique and list some of presentation technologies?
7
MC5012/ Service Oriented Architecture MCA 2019-2020
XML presentation technologies provide a modular way to deliver and display content to a
variety of devices. There are different presentation technologies used in XML to display
the content. Eg: CSS. Presentation technologies provide a modular way to deliver and
display content to a variety of devices. i) CSS ii) XSL iii) XFORMS iv) XHTML
15. What is XML Schema? (Nov 2016)
An XML schema is itself an XML document. It provides more detail about the kind of data
that can appear as part of an XML document.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
</xs:schema>
16. List some XML-related technology
XHTML (Extensible HTML) is a stricter and cleaner version of HTML.
XML DOM (XML Document Object Model) defines a standard way for accessing
and manipulating XML documents.
XSL (Extensible Style Sheet Language) - XSL consists of three parts: XSLT - a
language for transforming XML documents, XPath - a language for navigating in
XML documents, and XSL-FO - a language for formatting XML documents.
XSLT (XSL Transformations) is used to transform XML documents into other
XML formats, like XHTML. XPath is a language for navigating in XML documents.
17. Compare CSS and XSL.
CSS XSL
CSS can be used with XSL can’t be used in HTML
HTML
CSS is not a transformation CSS is a transformation language
language
XSL is having the XSL is having the formatting object tree
formatting object tree setup setup differently from the source tree
differently from the source
tree.
CSS provides the XSL can’t provide the inheritance of the
inheritance of the formatting source tree using the formatting
object that is related to the properties
source tree
18. What are XML transformation technologies?
An XML transformation language is a programming language designed specifically to
transform an input XML document into an output document which satisfies some specific
goal.
There are two special cases of transformation:
XML to XML: the output document is an XML document.
XML to Data: the output document is a byte stream.
8
MC5012/ Service Oriented Architecture MCA 2019-2020
Unit - III
1. Define WSDL
Web services Definition Language is the focal point of service design as it is used to
design the abstract and concrete definition of service interfaces. WSDL definition hosts
multiple child constructs associated with abstract and concrete parts of the service
description.
2. What are two types of WSDL elements?
The two types of WSDL elements are
abstract description
concrete description
3. What is SOAP? Why it is important? (Nov 2016)
SOAP - Simple Object Access Protocol.
9
MC5012/ Service Oriented Architecture MCA 2019-2020
Soap gives set of rules for moving data directly to the recipient or through and
intermediate message queue. Soap uses common web protocols like HTTP,FTP and
SMTP to enable communication across the web.
It is important for web applications to be able to communicate over the Internet. The best
way to communicate between applications is over HTTP, because HTTP is supported by
all Internet browsers and servers. SOAP was created to accomplish this. SOAP provides a
way to communicate between applications running on different operating systems, with
different technologies and programming languages.
4. What is HTTP?
HTTP stands for Hyper Text Transfer protocol.HTTP is a simple request response
protocol. A HTTP delivers a file to a browser. HTTP transfer data between client and
server.HTTP is an important building block for using XML as a Web-based messaging
protocol.
5. Describe HTTP GET command?
Client request files from servers using a simple text string of the form “GET filename”
The HTTP GETcommand request a web page.The HTTP POST command delivers
information and receives information back.
6. Define: XML-RPC
XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its
calls and HTTP as a transport mechanism.XML-RPC works by sending a HTTP request
to a server implementing the protocol.
7. List the data typing in XML-RPC.
XML schema data types to specify the parameter types of the procedure call. Data type
include scalars, numbers, strings and dates as well as complex record and list structure.
8. What are the features of SOAP?
SOAP stands for Simple Object Access Protocol
SOAP is a communication protocol
SOAP is for communication between applications
SOAP is a format for sending messages
SOAP is designed to communicate via Internet
SOAP is platform independent
SOAP is language independent
SOAP is based on XML
SOAP is simple and extensible
SOAP allows you to get around firewalls
SOAP will be developed as a W3C standard
9. List building blocks of SOAP.
A SOAP message is an ordinary XML document containing the following elements:
A required Envelope element that identifies the XML document as a SOAP message
An optional Header element that contains header information
A required Body element that contains call and response information
An optional Fault element that provides information about errors that occurred while
processing the message
10. Write the skeleton SOAP message.
Skeleton SOAP Message
<?xml version="1.0"?>
<soap:Envelope
10
MC5012/ Service Oriented Architecture MCA 2019-2020
xmlns:soap="http://www.w3.org/2001/12/soap-
envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-
encoding">
<soap:Header>
...
</soap:Header>
<soap:Body>
...
<soap:Fault>
...
</soap:Fault>
</soap:Body>
</soap:Envelope
11. What is the usage of envelope element in SOAP message structure? (Nov 2011)
Every SOAP message is packaged in to a container called Envelope. The
envelope is responsible for housing all parts of the message.
12. What is SOAP actor attributes?
A SOAP message may travel from a sender to a receiver by passing different
endpoints along the message path. Not all parts of the SOAP message may be intended
for the ultimate endpoint of the SOAP message but, instead, may be intended for one or
more of the endpoints on the message path. The SOAP actor attribute may be used to
address the Header element to a particular endpoint.
13.Write short notes on UDDI? (Nov 2016 / Nov 2018, April 2019)
UDDI is a platform-independent framework for describing services, discovering
businesses, and integrating business services by using the Internet.
UDDI is a directory service where businesses can register and search for Web
services.
UDDI stands for Universal Description, Discovery and Integration
UDDI is a directory for storing information about web services
UDDI is a directory of web service interfaces described by WSDL
UDDI communicates via SOAP
UDDI is built into the Microsoft .NET platform
14. Draw basic structure of UDDI with its elements.
11
MC5012/ Service Oriented Architecture MCA 2019-2020
<types>
data type definitions........
12
MC5012/ Service Oriented Architecture MCA 2019-2020
</types>
<message>
definition of the data being communicated....
</message>
<portType>
set of operations......
</portType>
<binding>
protocol and data format specification....
</binding>
</definitions>
A WSDL document can also contain other elements, like extension elements, and a
service element that makes it possible to group together the definitions of several web
services in one single WSDL document.
Unit – IV
1. Write the Basic Platform Blocks? / List the attributes of SOA platform (Nov 2018)
• Development environment
• Runtime
• APIs
• Operating system
2. Write the layers required by a development and run-time platform for building SOA?
13
MC5012/ Service Oriented Architecture MCA 2019-2020
14
MC5012/ Service Oriented Architecture MCA 2019-2020
J2EE solutions inherently are distributed and therefore componentized. The following
types of components can be used to build J2EE Web applications:
Java Server Pages (JSPs): Dynamically generated Web pages hosted by the Web server.
JSPs exist as text files comprised of code interspersed with HTML.
Struts: An extension to J2EE that allows for the development of Web applications with
sophisticated user -interfaces and navigation.
Java Servlets: These components also reside on the Web server and are used to process
HTTP request and response exchanges. Unlike JSPs, servlets are compiled programs.
Enterprise JavaBeans (EJBs): The business components that perform the bulk of the
processing within enterprise solution environments.
10. Define EJB Container and Web Container.
EJB container: This container is designed specifically to host EJB components, and it
provides a series of enterprise-level services.
Web container: A Web container can be considered an extension to a Web server and is
used to host Java Web applications consisting of JSP or Java servlet components.
11. Define JAX-WS. (or) Where is JAX-Ws used? (Nov 2016, April 2019)
JAX-WS stands for Java API for XML Web Services. JAX-WS is a technology for
building web services and clients that communicate using XML. JAX-WS allows
developers to write message-oriented as well as RPC-oriented web services.
12. Define Service endpoint interface
A service endpoint interface or service endpoint implementation (SEI) is a Java interface
or class, respectively that declares the methods that a client can invoke on the service.
An interface is not required when building a JAX-WS endpoint. The web service
implementation class implicitly defines an SEI.
13. What is the purpose of JAXB?
The Java Architecture for XML Binding (JAXB) provides a fast and convenient way to
bind between XML schemas and Java representations, making it easy for Java developers
to incorporate XML data and processing functions in Java applications.
14. Define Marshalling and Unmarshalling (April 2019)
Marshalling:provides a client application the ability to convert a JAXB-derived Java
object tree back into XML data.
Unmarshalling: provides a client application the ability to convert XML data into
JAXB-derived Java objects.
15. Define Schema-to-Java
Custom JAXB binding declarations allow you to customize your generated JAXB classes
beyond the XML-specific constraints in an XML schema to include Java-specific
refinements, such as class and package name mappings.
16. Define Java-to-Schema
The JAXB annotations defined in the javax.xml.bind.annotations package can be used to
customize Java program elements to XML schema mapping.
17. Define JAXR
The Java API for XML Registries (JAXR) provides a uniform and standard Java API for
accessing various kinds of XML registries.
19. What Is a Registry?
An XML registry is an infrastructure that enables the building, deployment, and
discovery of web services. It is a neutral third party that facilitates dynamic and loosely
15
MC5012/ Service Oriented Architecture MCA 2019-2020
Unit – V
1. Define cloud computing (Jan ’16 / Nov 2018)
Cloud computing refers to both the applications delivered as services over the internet,
and the hardware and system software in the data centers that provide those services. It is
the model for enabling ubiquitous, convenient, on demand network access to a shared
pool of configurable computing resources (networks, servers, storage, applications and
services) that can be rapidly provisioned and released with minimal management effort or
service provided interaction.
16
MC5012/ Service Oriented Architecture MCA 2019-2020
17
MC5012/ Service Oriented Architecture MCA 2019-2020
18
MC5012/ Service Oriented Architecture MCA 2019-2020
the provider's data center and the provider is responsible for the management and maintenance of
the data center.
22. List any four benefits of cloud computing. (Nov 2018, April 2019)
Disaster Recovery, Automatic software updates, Capital – expenditure free, increased
collaboration
19
MC5012/ Service Oriented Architecture MCA 2019-2020
Part-B
Unit – I
1. Compare SOA to client-server architecture.
2. With a neat diagram, explain distributed internet architecture (Nov 2017)
3. Give a comparative study of service orientation with object orientation.
4. Explain about common characteristics of contemporary SOA. (Jan 2016)
5. How components in SOA are related? Explain (Nov 2017)
6. Explain in detail the principles of service orientation. (Jan 2016) (Nov 2016)
7. Explain SOA vs. hybrid Web service architecture with case study.
8. Briefly explain the functionalities of orchestrzation service layer (Nov 2017)
9. Explain in detail about the misconceptions about SOA and the benefits.
10. Describe in detail about the pitfalls of adopting SOA
11. Describe client server architecture and its types with a neat diagram. (Nov 2016)
Unit – II
1. Explain in detail about the XML Structure with suitable example
2. Describe in detail about the XML Elements, Attributes and Namespaces
3. Describe in detail about XML Schema and DTD
4. Draw the web service architecture and explain its components
5. How a well formed XML could be developed? Explain with an example (Nov 2017)
6. Describe about the XML attributes?
7. Explain in detail about the XSD Complex Elements with suitable example.
8. Explain in detail about the XML presentation technologies.
9. Write a note on XML transformation technologies (Nov 2016)
10. What is XSL? How it perform XML parsing? (Nov 2017)
Unit – III
1. Explain in detail about SOAP protocol with its attachments and the message structure briefly.
2. Explain how request and response messages are implemented in XML-RPC. (Nov 2017)
3. List the SOAP intermediaries & illustrate message path is determined at runtime (Nov 2017)
4. Explain in detail about the UDDI architecture
5. Describe in detail about the following: i) SOAP and actors ii) SOAP Faults
6. Explain in detail about the following: i) HTTP ii) XML-RPC
7. How SOAP attachments are used to transport binary files? Explain (Nov 2016)
8. Write the structure and purpose of Header Blocks in SOAP message. (Nov 2017)
9. What are SOAP intermediaries? Explain it with example.
10. i)Write a note on SOAP design patterns.
ii) Describe the structure of WSDL document. (Jan 2016)
(iii) Describe the connection between UDDI and WSDL. (Jan’16)
9. Explain how SOAP protocol supports data exchange across the web. (Nov 2016)
10. Write a WSDL extract to show a document style message that can be sent with SOAP
encoding for ‘schedule payment’ operation to be used by a telecom technical support
company. (Nov 2016)
11. Consider a catalogue application that is able to retrieve product information from a database.
This application might be used by a department that need to keep updated about the
latest products and pricing offered by the company. The database might reside in a
20
MC5012/ Service Oriented Architecture MCA 2019-2020
different country. Hence local currency conversion also needs to be performed based on
where the application is run
i) Represent the design of this application diagrammatically
ii) Identify the challenges to be considered this non-SOA system to SOA-
based system.
iii) Suggest an architecture of this system with SOA (Nov 2017)
Unit – IV
1. Explain the Java API for XML based web services (JAX-WS) with all the components support
2. Discuss about Contemporary SOA support
3. Discuss about J2EE handlers as service agents.
4. Discuss in detail about typical J2EE service provider. (Nov 2016)
5. Discuss in detail about typical J2EE service requester. (Nov 2016)
6. Explain briefly about Creating a Simple Web Service and Client with JAX-WS.
7. Explain briefly about JAXB Architecture.
8. Explain briefly about JAXR Architecture.
9. How SOA is supported in .NET environment? Give an example for service creation and
invocation in .NET (Nov 2017)
10.Explain briefly about ASP.NET web services.
11. Describe about Java API for XML based web services. (Nov 2016)
12. Consider a telecom technical support company where customers place orders for products
and services. Customers can select the products and services and the support representative
validates the request and provides service. Identify and explain the types of interactions used for
the accomplishment of activities in this business scenario. Also create a web service and client
for the telecom support company using JAX-WS. (Nov 2016)
Unit – V
1. Analyze the various types of cloud platforms available and evaluate which ones are currently
used in industries for what purpose. (Nov 2017)
2. Describe in detail about the various characteristics and benefits of cloud.
3. Discuss in detail about the cloud reference model.
4. What are the various types of cloud? Explain them in detail.
5. Explain in detail about the taxonomy of virtualization techniques.
7. Describe in detail about the characteristics of virtualized environments.
8. List the types of clouds. How they are applied in problem domains. Explain (Nov 2017)
9. Discuss in detail about the virtualization and cloud computing.
10. Explain in detail about the classification of cloud computing services.
11. Explain the architecture of cloud computing with a neat diagram. (Nov 2017)
12. With a neat diagram, explain the architecture of hybrid cloud. (Nov 2016)
21
MC5012/ Service Oriented Architecture MCA 2019-2020
Part-B
Unit – I
1. Compare SOA to client-server architecture.
Service Oriented Architecture
Spans both enterprise and application architecture domains
Benefits of SOA are realized when applied across multiple solution environments
Because SOA is a composable architecture, i.e. individual application-level architectures can be
comprised of different extensions and technologies
A company may have multiple SOAs
Mainframes provided the first “client-server” computing with synchronous and asynchronous
communication
Asynchronous à allow the server to continuously receive characters from the terminal. Only
upon certain conditions would the server actually respond
1980s – single-tier with thin clients
two-tier client server with fat clients, GUI, database. Dominated the 90s
22
MC5012/ Service Oriented Architecture MCA 2019-2020
APPLICATION LOGIC
SOA Characteristics
Presentation layer can be any software capable of exchanging SOAP messages
Within the server environment, SOA principles dictate partitioning logic into autonomous units
which facilitates specific design qualities such as service statelessness and interoperability, as
well as future composability and reusability
SOA units of processing logic are solution agnostic that supports reuse and loose coupling
Client-Server Application Processing
80% - workstation, 20% server
Even though, the database is often the bottleneck
Two-tier solutions usually mean each client has a database connection
Connections are often synchronous and persistent (meaning that they are generated upon user
login and kept active until the user exits the application)
Client-side executables are fully stateful and consume a steady chunk of PC memory
So the client programs run exclusively so that all available resources can be offered to the
application
SOA Application Processing
Processing with SOA is highly distributed
Each service has explicit functional boundaries and resource requirements
SOA allows many options for deploying services
Enterprise solutions consist of multiple servers with sets of Web services and supporting
middleware
With SOA there is no fixed processing ratio
Supports synchronous and asynchronous communication between service and requestors
Messages are loaded with intelligence to support message-level context management
Smart messaging promotes stateless and autonomous services
Client-Server vs. SOA Application Technology
The technology set for client-server applications included 4GLs like VB and PowerBuilder,
RDBMSs
The SOA technology set has expanded to include Web technologies (HTML, CSS, HTTP, etc)
SOA requires the use of XML data representation architecture along with a SOAP messaging
framework
Client-Server Vs SOA Application Security
Centralized at the Server level security
Databases manage user accounts and groups
Also controlled within the client executable area
Security for SOA is much more complex
Security complexity is directly related to the degree of security measures required
Multiple technologies are required in WS-Security framework
Client-Server Application Vs SOA Administration
Significant maintenance costs associated with client-server
Each client housed application code
Each update required redistribution
Client stations were subjected to environment-specific problems
23
MC5012/ Service Oriented Architecture MCA 2019-2020
2. With a neat diagram, explain distributed internet architecture / Discuss the evolution of
distributed computing paradigm. (Dec 2017 / 2016)
24
MC5012/ Service Oriented Architecture MCA 2019-2020
25
MC5012/ Service Oriented Architecture MCA 2019-2020
APPLICATION LOGIC
The browser shifted 100% of application logic to the server
Distributed Internet architecture introduced the Web server as a new physical tier
HTTP replaced RPC protocols
Distributed Internet application put all the application logic on the server side
Even client-side scripts are downloaded from the server
Entire solution is centralized
Emphasis is on:
How application logic is partitioned
Where partitioned units reside
How units of logic should interact
Difference lies in the principles used to determine the three primary design considerations
Traditional systems create components that reside on one or more application servers
Components have varying degrees of functional granularity
Components on the same server communicate via proprietary APIs.
RPC protocols are used across servers via proxy stubs
26
MC5012/ Service Oriented Architecture MCA 2019-2020
Actual references to other physical components can be embedded in programming code (tight
coupling)
SOAs also rely on components
Services encapsulate components
Services expose specific sets of functionality
Functionality can originate from legacy systems or other sources
Functionality is wrapped in services
Functionality is exposed via open, standardized interface, irrespective of technology providing
the solution
Services exchange information via SOAP messages. SOAP supports RPC-style and document-
style messages
Most applications rely on document-style
Messages are structured to be self-sufficient
Messages contain meta information, processing instructions, policy rules
SOA fosters reuse on a deep level by promoting solution-agnostic services
Application Processing
Distributed Internet architecture promotes the use of proprietary communication protocols
(DCOM, CORBA)
SOA relies on message-based communication
Messages use serialization, transmission, de-serialization of SOAP messages containing XML
payloads
RPC communication is faster than SOAP and SOAP processing overhead is a significant design
issue
Messaging framework supports a wide range message exchange patterns
Asynchronous patterns are encouraged
Support for stateless services is supported by context management options (WS-Coordination,
WS-BPEL)
Technology
Distributed Internet architecture now includes XML data representation
XML and Web services are optional for distributed Internet architecture but not for SOA
Security
When application logic crosses physical boundaries, security becomes more difficult
Traditional security architectures incorporate delegation and impersonation as well as encryption
SOAs depart from this model by relying heavily on WS-Security to provide security logic on the
messaging level
SOAP messages carry headers where security logic can be stored
Administration
Maintaining component-based applications involves:
27
MC5012/ Service Oriented Architecture MCA 2019-2020
28
MC5012/ Service Oriented Architecture MCA 2019-2020
29
MC5012/ Service Oriented Architecture MCA 2019-2020
Promotes discovery
Universal Description Discovery and Integration (UDDI) provided for service registries
Few early SOA systems used UDDI
Promotes federation
Establish SOA in an enterprise doesn’t require replacement of what you have
SOA helps establish unity across non-federated environments
Legacy logic is exposed via a common, open, and standardized communication network
Supports a service-oriented business modeling paradigm
Business processes are modeled with services and cut vertically through business logic
BPM models, entity models and other forms of business intelligence can be accurately
represented through coordinated composition of business-centric services
30
MC5012/ Service Oriented Architecture MCA 2019-2020
31
MC5012/ Service Oriented Architecture MCA 2019-2020
5. How components of SOA are related explain? Explain the anatomy of SOA architecture
and explain the components (Nov 2017 / Nov 2018)
Logic components of the Web services framework. Web services contain one or more
operations. Figure shows an example
Each operation governs the process of a specific function the web service is capable of
performing.
Figure gives an example of an operation sending and receiving SOAP messages
Web services form an activity through which they can collectively automate a task.
32
MC5012/ Service Oriented Architecture MCA 2019-2020
Components of an SOA
Message
A message represents the data required to complete some or all parts of a unit of work.
Operation
An operation represents the logic required to process messages in order to complete a unit
of work.
33
MC5012/ Service Oriented Architecture MCA 2019-2020
Service
A service represents a logically grouped set of operations capable of performing related
units of work
Processes
A process contains the business rules that determine which service operations are used to
complete a unit of automation
A process represents a large piece of work that requires the completion of smaller units of
work
34
MC5012/ Service Oriented Architecture MCA 2019-2020
6. Explain in detail the principles of service orientation. (Jan ’16 & Nov 2016 / Nov 2018)
Common principles of service-orientation
1. Services are reusable
2. Services share a formal contract
3. Services are loosely coupled
4. Services abstract underlying logic
5. Services are composable
6. Services are autonomous
7. Services are stateless
8. Services are discoverable
1. Services are reusable
Regardless of whether immediate reuse opportunities exist, services are designed to support
potential reuse.
Service-oriented encourages reuse in all services.
By applying design standards that require reuse accommodate future requirements with less
development effort
For services to interact, they need to share formal contract that describe each service and define
the terms of information exchange.
Service contracts provide a formal definition of:
The service endpoint
Each service operation
Every input and output message supported by each operation
Rules and characteristics of the service and its operations
Service contacts define almost all of the primary parts of an SOA.
35
MC5012/ Service Oriented Architecture MCA 2019-2020
The only part of a service that is visible to the outside world is what is exposed via the service
contract. Underlying logic, beyond what is expressed in the descriptions that comprise the
contract, is invisible and irrelevant to service requestors
36
MC5012/ Service Oriented Architecture MCA 2019-2020
The services reside inside a well defined boundary and for the successful execution of a
service it does not depend on other service for it to execute its governance.
Service are not allowed to store the state information as it will not allow the service
to be loosely coupled.
Services should be designed to maximize statelessness even if that means deferring
state management elsewhere.
Statelessness is a preferred condition for services and one that promotes reusability
and scalability.
37
MC5012/ Service Oriented Architecture MCA 2019-2020
38
MC5012/ Service Oriented Architecture MCA 2019-2020
The service should allow their description to be searched and understood by humans.
9. Explain SOA vs. hybrid Web service architecture with case study.
39
MC5012/ Service Oriented Architecture MCA 2019-2020
10. Discuss in detail about three service layers in detail./ What are service layers? Explain the
need for different layers. (Jan’16 / Nov 2018)
40
MC5012/ Service Oriented Architecture MCA 2019-2020
– e.g. a utility service is by definition a generic reusable service not bound to any business
entity: task or entity based
9. Explain in detail about the misconceptions about SOA and the benefits.
Misconceptions
Benefits
41
MC5012/ Service Oriented Architecture MCA 2019-2020
11. Describe client server architecture and its types with a neat diagram. (Nov 2016)
2-tier architecture is used to describe client/server systems where the client requests resources and the
server responds directly to the request, using its own resources. This means that the server does not call
on another application in order to provide part of the service.
42
MC5012/ Service Oriented Architecture MCA 2019-2020
The widespread use of the term 3-tier architecture also denotes the following architectures: Application
sharing between a client, middleware and enterprise server Application sharing between a client,
application server and enterprise database server.
2-tier architecture is therefore a client-server architecture where the server is versatile, i.e. it is capable of
directly responding to all of the client's resource requests. In 3-tier architecture however, the server-level
applications are remote from one another, i.e. each server is specialized with a certain task (for example:
web server/database server). 3-tier architecture provides: A greater degree of flexibility Increased security,
as security can be defined for each service, and at each level Increased performance, as tasks are shared
between servers Multi-Tiered Architecture In 3-tier architecture, each server (tier 2 and 3) performs a
specialized task (a service). A server can therefore use services from other servers in order to provide its
own service. As a result, 3- tier architecture is potentially an n-tiered architecture
43
MC5012/ Service Oriented Architecture MCA 2019-2020
Unit – II
1. Explain in detail about the XML Structure with suitable example
XML documents form a tree structure that starts at "the root" and branches to "the leaves".
An Example XML Document
XML documents must contain a root element. This element is "the parent" of all other elements. The
elements in an XML document form a document tree. The tree starts at the root and branches to the
lowest level of the tree. All elements can have sub elements (child elements):
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
All elements can have text content and attributes (just like in HTML). The image below represents one
book in the XML below:
44
MC5012/ Service Oriented Architecture MCA 2019-2020
<bookstore>
<book category="COOKING">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title lang="en">Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
The root element in the example is <bookstore>. All <book> elements in the document are contained
within <bookstore>. The <book> element has 4 children: <title>,< author>, <year>, <price>.
45
MC5012/ Service Oriented Architecture MCA 2019-2020
<root>
<child>
<subchild>.....</subchild>
</child>
</root>
6. Entity References
Some characters have a special meaning in XML.
If you place a character like "<" inside an XML element, it will generate an error because the
parser interprets it as the start of a new element. This will generate an XML error:
<message>if salary < 1000 then</message>
To avoid this error, replace the "<" character with an entity reference:
<message>if salary < 1000 then</message>
7. Comments in XML
The syntax for writing comments in XML is similar to that of HTML.
<!-- This is a comment -->
46
MC5012/ Service Oriented Architecture MCA 2019-2020
<bookstore>
<book category="CHILDREN">
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book category="WEB">
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>
</bookstore>
In the example above, <bookstore> and <book> have element contents, because they contain other
elements. <book> also has an attribute (category="CHILDREN"). <title>, <author>, <year>, and
<price> have text content because they contain text.
47
MC5012/ Service Oriented Architecture MCA 2019-2020
Naming Styles
There are no naming styles defined for XML elements. But here are some commonly used:
Style Example Description
Lower case <firstname> All letters lower case
Upper case <FIRSTNAME> All letters upper case
Underscore <first_name> Underscore separates words
Pascal case <FirstName> Uppercase first letter in each word
Camel case <firstName> Uppercase first letter in each word except the first
If you choose a naming style, it is good to be consistent! XML documents often have a corresponding
database. A good practice is to use the naming rules of your database for the elements in the XML
documents.
MESSAGE
To: Tove
From: Jani
Don't forget me this weekend!
XML Attributes
XML elements can have attributes, just like HTML. Attributes provide additional information
about an element.
XML Attributes
In HTML, attributes provide additional information about elements:
48
MC5012/ Service Oriented Architecture MCA 2019-2020
<img src="computer.gif">
<a href="demo.asp">
Attributes often provide information that is not a part of the data. In the example below, the file
type is irrelevant to the data, but can be important to the software that wants to manipulate the
element:
<file type="gif">computer.gif</file>
<person gender="female">
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
<person>
<gender>female</gender>
<firstname>Anna</firstname>
<lastname>Smith</lastname>
</person>
In the first example gender is an attribute. In the last, gender is an element. Both examples
provide the same information. There are no rules about when to use attributes or when to use
elements.
Avoid XML Attributes?
Some of the problems with using attributes are:
attributes cannot contain multiple values (elements can)
attributes cannot contain tree structures (elements can)
attributes are not easily expandable (for future changes)
Attributes are difficult to read and maintain. Use elements for data. Use attributes for information that
is not relevant to the data.
XML Attributes for Metadata
Sometimes ID references are assigned to elements. These IDs can be used to identify XML
elements in much the same way as the id attribute in HTML. This example demonstrates this:
49
MC5012/ Service Oriented Architecture MCA 2019-2020
<messages>
<note id="501">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
<note id="502">
<to>Jani</to>
<from>Tove</from>
<heading>Re: Reminder</heading>
<body>I will not</body>
</note>
</messages>
The id attributes above are for identifying the different notes. It is not a part of the note itself. The
metadata (data about data) should be stored as attributes, and the data itself should be stored as elements.
XML Namespaces
XML Namespaces provide a method to avoid element name conflicts.
Name Conflicts
In XML, element names are defined by the developer. This often results in a conflict when trying
to mix XML documents from different XML applications. This XML carries HTML table
information:
<table>
<tr>
<td>Apples</td>
<td>Bananas</td>
</tr>
</table>
This XML carries information about a table (a piece of furniture):
<table>
<name>African Coffee Table</name>
<width>80</width>
<length>120</length>
</table>
If these XML fragments were added together, there would be a name conflict. Both contain a
<table> element, but the elements have different content and meaning.
A user or an XML application will not know how to handle these differences.
Solving the Name Conflict Using a Prefix
Name conflicts in XML can easily be avoided using a name prefix. This XML carries information
about an HTML table, and a piece of furniture:
<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
<f:table>
50
MC5012/ Service Oriented Architecture MCA 2019-2020
<f:name>African Coffee
Table</f:name>
<f:width>80</f:width>
<f:length>120</f:length>
</f:table>
In the example above, there will be no conflict because the two <table> elements have different
names.
XML Namespaces - The xmlns Attribute
When using prefixes in XML, a so-called namespace for the prefix must be defined. The
namespace is defined by the xmlns attribute in the start tag of an element. The namespace
declaration has the following syntax. xmlns:prefix="URI".
<root>
<h:table xmlns:h="http://www.w3.org/TR/html4/">
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
<f:table xmlns:f="http://www.w3schools.com/furniture">
<f:name>African Coffee Table</f:name>
<f:width>80</f:width>
<f:length>120</f:length>
</f:table>
</root>
In the example above, the xmlns attribute in the <table> tag give the h: and f: prefixes a qualified
namespace. When a namespace is defined for an element, all child elements with the same prefix
are associated with the same namespace. Namespaces can be declared in the elements where they
are used or in the XML root element:
<root xmlns:h="http://www.w3.org/TR/html4/"
xmlns:f="http://www.w3schools.com/furniture">
<h:table>
<h:tr>
<h:td>Apples</h:td>
<h:td>Bananas</h:td>
</h:tr>
</h:table>
<f:table>
<f:name>African Coffee Table</f:name>
<f:width>80</f:width>
51
MC5012/ Service Oriented Architecture MCA 2019-2020
<f:length>120</f:length>
</f:table>
</root>
Default Namespaces
Defining a default namespace for an element saves us from using prefixes in all the child elements. It has
the following syntax:
xmlns="namespaceURI"
This XML carries HTML table information:
<table xmlns="http://www.w3.org/TR/html4/">
<tr>
<td>Apples</td>
<td>Bananas</td>
</tr>
</table>
This XML carries information about a piece of furniture:
<table xmlns="http://www.w3schools.com/furniture">
<name>African Coffee Table</name>
<width>80</width>
<length>120</length>
</table>
xmlns:xsl="http://www.w3.org/1999/XSL/Transform":
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr>
<th style="text-align:left">Title</th>
<th style="text-align:left">Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td><xsl:value-of select="title"/></td>
52
MC5012/ Service Oriented Architecture MCA 2019-2020
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
XML Schema
An XML Schema describes the structure of an XML document, just like a DTD.
An XML document with correct syntax is called "Well Formed".
An XML document validated against an XML Schema is both "Well Formed" and "Valid".
The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a
DTD.
An XML Schema:
defines elements that can appear in a document
defines attributes that can appear in a document
defines which elements are child elements
defines the order of child elements
defines the number of child elements
defines whether an element is empty or can include text
defines data types for elements and attributes
defines default and fixed values for elements and attributes
XML Schema Example
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
53
MC5012/ Service Oriented Architecture MCA 2019-2020
XML DTD
The DOCTYPE declaration, in the example above, is a reference to an external DTD file. The content of
the file is shown in the paragraph below.
The purpose of a DTD is to define the structure of an XML document. It defines the structure
with a list of legal elements:
<!DOCTYPE note
[
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
The DTD above is interpreted like this:
!DOCTYPE note defines that the root element of the document is note
!ELEMENT note defines that the note element must contain four elements: "to, from, heading,
body"
!ELEMENT to defines the to element to be of type "#PCDATA"
!ELEMENT from defines the from element to be of type "#PCDATA"
!ELEMENT heading defines the heading element to be of type "#PCDATA"
!ELEMENT body defines the body element to be of type "#PCDATA"
54
MC5012/ Service Oriented Architecture MCA 2019-2020
With a DTD, independent groups of people can agree on a standard for interchanging data. With a DTD,
you can verify that the data you receive from the outside world is valid.
5. Discuss in detail about creating well-formed XML - Schema Elements and Simple Types. / What
are the rules to be followed for writing a well formed and valid XML? (Nov 2017/Jan’16 & Nov
2016)
55
MC5012/ Service Oriented Architecture MCA 2019-2020
<lastname>Refsnes</lastname>
<age>36</age>
<dateborn>1970-03-27</dateborn>
And here are the corresponding simple element definitions:
<xs:element name="lastname" type="xs:string"/>
<xs:element name="age" type="xs:integer"/>
<xs:element name="dateborn" type="xs:date"/>
Default and Fixed Values for Simple Elements
Simple elements may have a default value OR a fixed value specified. A default value is automatically
assigned to the element when no other value is specified. In the following example the default value is
"red":
<xs:element name="color" type="xs:string" default="red"/>
A fixed value is also automatically assigned to the element, and you cannot specify another value.
In the following example the fixed value is "red":
<xs:element name="color" type="xs:string" fixed="red"/>
A fixed value is also automatically assigned to the attribute, and you cannot specify another value.In the
following example the fixed value is "EN":
<xs:attribute name="lang" type="xs:string" fixed="EN"/>
Optional and Required Attributes
Attributes are optional by default. To specify that the attribute is required, use the "use" attribute:
<xs:attribute name="lang" type="xs:string" use="required"/>
56
MC5012/ Service Oriented Architecture MCA 2019-2020
Restrictions on Content
When an XML element or attribute has a data type defined, it puts restrictions on the element's or
attribute's content. If an XML element is of type "xs:date" and contains a string like "Hello World", the
element will not validate. With XML Schemas, you can also add your own restrictions to your XML
elements and attributes. These restrictions are called facets.
7. Explain in detail about the XSD Complex Elements with suitable example.
A complex element contains other elements and/or attributes.
What is a Complex Element?
A complex element is an XML element that contains other elements and/or attributes.
There are four kinds of complex elements:
empty elements
elements that contain only other elements
elements that contain only text
elements that contain both other elements and text
Note: Each of these elements may contain attributes as well!
Examples of Complex Elements
A complex XML element, "product", which is empty:
<product pid="1345"/>
A complex XML element, "employee", which contains only other elements:
employee>
<firstname>John</firstname>
<lastname>Smith</lastname>
</employee>
A complex XML element, "description", which contains both elements and text:
<description>
It happened on <date lang="norwegian">03.03.99</date> ....
</description>
1. The "employee" element can be declared directly by naming the element, like this:
<xs:element name="employee">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
If you use the method described above, only the "employee" element can use the specified complex type.
Note that the child elements, "firstname" and "lastname", are surrounded by the <sequence> indicator.
This means that the child elements must appear in the same order as they are declared. You will learn
more about indicators in the XSD Indicators chapter.
57
MC5012/ Service Oriented Architecture MCA 2019-2020
2. The "employee" element can have a type attribute that refers to the name of the complex type to
use:
3. If you use the method described above, several elements can refer to the same complex type, like
this:
4. You can also base a complex element on an existing complex element and add some elements, like
this:
<xs:complexType name="personinfo">
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="fullpersoninfo">
<xs:complexContent>
<xs:extension base="personinfo">
<xs:sequence>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
58
MC5012/ Service Oriented Architecture MCA 2019-2020
The "product" element above has no content at all. To define a type with no content, we must define a
type that allows elements in its content, but we do not actually declare any elements, like this:
<xs:element name="product">
<xs:complexType>
<xs:complexContent>
<xs:restriction base="xs:integer">
<xs:attribute name="prodid" type="xs:positiveInteger"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
In the example above, we define a complex type with a complex content. The complexContent element
signals that we intend to restrict or extend the content model of a complex type, and the restriction of
integer declares one attribute but does not introduce any element content.
However, it is possible to declare the "product" element more compactly, like this:
<xs:element name="product">
<xs:complexType>
<xs:attribute name="prodid" type="xs:positiveInteger"/>
</xs:complexType>
</xs:element>
Or you can give the complexType element a name, and let the "product" element have a type attribute that
refers to the name of the complexType (if you use this method, several elements can refer to the same
complex type):
59
MC5012/ Service Oriented Architecture MCA 2019-2020
</xs:complexType>
</xs:element>
Notice the <xs:sequence> tag. It means that the elements defined ("firstname" and "lastname") must
appear in that order inside a "person" element.
Or you can give the complexType element a name, and let the "person" element have a type attribute that
refers to the name of the complexType (if you use this method, several elements can refer to the same
complex type):
<xs:element name="person" type="persontype"/>
<xs:complexType name="persontype">
<xs:sequence>
<xs:element name="firstname" type="xs:string"/>
<xs:element name="lastname" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="somename">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="basetype">
....
....
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
OR
<xs:element name="somename">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="basetype">
....
....
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
Tip: Use the extension/restriction element to expand or to limit the base simple type for the element.
Here is an example of an XML element, "shoesize", that contains text-only:
<shoesize country="france">35</shoesize>
60
MC5012/ Service Oriented Architecture MCA 2019-2020
The following example declares a complexType, "shoesize". The content is defined as an integer value,
and the "shoesize" element also contains an attribute named "country":
<xs:element name="shoesize">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="country" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
We could also give the complexType element a name, and let the "shoesize" element have a type attribute
that refers to the name of the complexType (if you use this method, several elements can refer to the same
complex type):
<xs:complexType name="shoetype">
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="country" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
1) XSL
2) XFORMS
3) XHTML
61
MC5012/ Service Oriented Architecture MCA 2019-2020
</catalog>
Then you create an XSL Style Sheet ("cdcatalog.xsl") with a transformation template:
2. XFORMS:
XForms is the next generation of HTML forms. XForms is richer and more flexible than HTML
forms. XForms will be the forms standard in XHTML 2.0. XForms is platform and device
independent. XForms separates data and logic from presentation. XForms uses XML to define form
data. XForms stores and transports data in XML documents. XForms contains features like
calculations and validations of forms. XForms reduces or eliminates the need for scripting. XForms is
a W3C Recommendation. The XForms Model. The XForms model is used to describe the data. The
data model is an instance (a template) of an XML document. The XForms model defines a data model
inside a <model> element:
62
MC5012/ Service Oriented Architecture MCA 2019-2020
<model>
<instance>
<person>
<fname/>
<lname/>
</person> </instance>
<submission id="form1" action="submit.asp" method="get"/>
</model>
<model>
<instance>
<person>
<fname/>
<lname/>
</person>
</instance>
<submission id="form1" action="submit.asp" method="get"/>
</model>
<xforms>
<model>
<instance>
<person><fname/><lname/></person></instance>
<submission id="form1" action="submit.asp" method="get"/>
</model>
<input ref="fname"><label>First Name</label></input><input
ref="lname"><label>Last Name</label></input><submit submission="form1">
<label>Submit</label>
</submit>
</xforms>
Output
3. XHTML:
XHTML stands for EXtensible HyperText Markup Language. XHTML is aimed to replace
HTML. XHTML is almost identical to HTML 4.01. XHTML is a stricter and cleaner version of
63
MC5012/ Service Oriented Architecture MCA 2019-2020
An XHTML DTD describes in precise, computer-readable language, the allowed syntax and grammar
of XHTML markup. There are currently 3 XHTML document types:
i. STRICT
ii. TRANSITIONAL
iii. FRAMESET
64
MC5012/ Service Oriented Architecture MCA 2019-2020
2. XPATH:
XPath is a syntax for defining parts of an XML document. XPath uses path expressions to
navigate in XML documents. XPath contains a library of standard functions. XPath is a major
element in XSLT. XPath is a W3C Standard.
XPath Terminology
Nodes: In XPath, there are seven kinds of nodes: element, attribute, text, namespace, processing-
instruction, comment, and document (root) nodes. XML documents are treated as trees of nodes. The
root of the tree is called the document node (or root node).
Relationship of Nodes
i. Parent
ii. Children
iii. Siblings
iv. Ancestors
65
MC5012/ Service Oriented Architecture MCA 2019-2020
v. Descendants
Predicates:
Selecting several paths:
3. XQuery:
XQuery is the language for querying XML data. XQuery for XML is like SQL for databases. XQuery
is built on XPath expressions. XQuery is supported by all the major database engines (IBM, Oracle,
Microsoft, etc.). XQuery is a W3C Recommendation.
66
MC5012/ Service Oriented Architecture MCA 2019-2020
book elements under the bookstore element, and /title selects all the title elements under each book
element), The XQuery above will extract the following:
<title lang="en">Everyday Italian</title>
<title lang="en">Harry Potter</title>
<title lang="en">XQuery Kick Start</title>
<title lang="en">Learning XML</title>
Predicates:
XQuery uses predicates to limit the extracted data from XML documents. The following predicate is
used to select all the book elements under the bookstore element that have a price element with a value
that is less than 30: doc("books.xml")/bookstore/book[price<30]The XQuery above will extract the
following:
<book category="CHILDREN">
<title lang="en">Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
With FLWOR:
FLWOR is an acronym for "For, Let, Where, Order by, Return". The for clause selects all book
elements under the bookstore element into a variable called $x. The where clause selects only book
elements with a price element with a value greater than 30.The order by clause defines the sort-order.
Will be sort by the title element. The return clause specifies what should be returned. Here it returns
the title elements.
Example: doc("books.xml")/bookstore/book[price>30]/title
The following FLWOR expression will select exactly the same as the path expression above:
for $x in doc("books.xml")/bookstore/book where $x/price>30 return $x/title
The result will be:
<title lang="en">XQuery Kick Start</title>
<title lang="en">Learning XML</title>
With FLWOR you can sort the result:
for $x in doc("books.xml")/bookstore/book where $x/price>30 order by $x/title return $x/title
10. i) What is XSL? How it perform XML parsing / Describe in detail about XSL Transformations.
(Nov 2017 / Nov 2016)
XSLT stands for XSL Transformations
XSLT References
XSLT Elements
Description of all the XSLT elements from the W3C Recommendation, and information about
browser support.
XSLT Functions
XSLT includes over 100 built-in functions. There are functions for string values, numeric values, date and
time comparison, node and QName manipulation, sequence manipulation, Boolean values, and more.
What is XSLT?
XSLT stands for XSL Transformations
XSLT is the most important part of XSL
XSLT transforms an XML document into another XML document
XSLT uses XPath to navigate in XML documents
XSLT = XSL Transformations
XSLT is the most important part of XSL. XSLT is used to transform an XML document
into another XML document, or another type of document that is recognized by a
67
MC5012/ Service Oriented Architecture MCA 2019-2020
browser, like HTML and XHTML. Normally XSLT does this by transforming each XML
element into an (X)HTML element. With XSLT it is possible to add/remove elements and
attributes to or from the output file. You can also rearrange and sort elements, perform
tests and make decisions about which elements to hide and display, and a lot more. A
common way to describe the transformation process is to say that XSLT transforms an
XML source-tree into an XML result-tree.
XSLT Uses XPath
XSLT uses XPath to find information in an XML document. XPath is used to navigate
through elements and attributes in XML documents.
Correct Style Sheet Declaration
The root element that declares the document to be an XSL style sheet is <xsl:stylesheet>
or <xsl:transform>.
Note: <xsl:stylesheet> and <xsl:transform> are completely synonymous and either can be used!
The correct way to declare an XSL style sheet according to the W3C XSLT Recommendation is:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
To get access to the XSLT elements, attributes and features we must declare the XSLT namespace
at the top of the document.
The xmlns:xsl="http://www.w3.org/1999/XSL/Transform" points to the official W3C XSLT
namespace. If you use this namespace, you must also include the attribute version="1.0".
Start with a Raw XML Document
Transform the following XML document ("cdcatalog.xml") into XHTML:
<?xml version="1.0" encoding="UTF-8"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
.
.
</catalog>
Create an XSL Style Sheet
Create an XSL Style Sheet ("cdcatalog.xsl") with a transformation template:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
68
MC5012/ Service Oriented Architecture MCA 2019-2020
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
69
MC5012/ Service Oriented Architecture MCA 2019-2020
DOM can traverse the tree structure in memory; SAX locates a specific element and ignores
the surrounding elements.
DOM SAX
Tree model parser (Tree of nodes) Event based parser (Sequence of events)
DOM loads the file into the memory and then parse the file SAX parses the file at it reads i.e. Parses node
by node
Has memory constraints since it loads the whole XML file No memory constraints as it does not store the
before parsing XML content in the memory
DOM is read and write (can insert or delete the node) SAX is read only i.e. can’t insert or delete the
node
If the XML content is small then prefer DOM parser Use SAX parser when memory content is large
Backward and forward search is possible for searching the SAX reads the XML file from top to bottom
tags and evaluation of the information inside the tags. So this and backward navigation is not possible
gives the ease of navigation
Slower at runtime Faster at runtime
SAX Stands for Simple API for XML Parsing. This is an event based XML Parsing and it parse XML file
step by step so much suitable for large XML Files. SAX XML Parser fires an event when it encountered
opening tag, element or attribute, and the parsing works accordingly. It’s recommended to use SAX XML
parser for parsing large XML files in Java because it doesn't require to load whole XML file in Java and it
can read a big XML file in small parts. Java provides support for SAX parser and you can parse any XML
file in Java using SAX Parser, I have covered an example of reading XML file using SAX Parser here.
One disadvantage of using SAX Parser in java is that reading XML file in Java using SAX Parser requires
more code in comparison of DOM Parser.
DOM parser loads whole XML document in memory while SAX only loads a small part of the XML file
in memory.
2) DOM parser is faster than SAX because it access whole XML document in memory.
3) SAX parser in Java is better suitable for large XML file than DOM Parser because it doesn't require
much memory.
4) DOM parser works on Document Object Model while SAX is an event based XML parser.
70
MC5012/ Service Oriented Architecture MCA 2019-2020
CSS allows you to style HTML documents (XSLT cannot, and XSL-FO cannot unless the
documents are valid XHTML documents)
XSL-FO allows you to style XML documents via an XML syntax (CSS and XSLT cannot),
although web support is lacking
XSLTCSS cannot reuse document data
CSS cannot conditionally select document data (other than hiding specific types of elements)
CSS cannot calculate quantities or store values in variables
CSS cannot generate dynamic text, such as page numbers
allows you to transform XML documents (CSS and XSL-FO cannot)
SOA provides a cost effective solution to legacy enterprise information system. (EIS).
SOA defined by Sun is an environment for dynamic discovery and use of services over a network.
Web services have taken the concept of services introduced by Jini technology and implemented it as
services delivered over the web using technologies such as XML, Web Services Description Language
(WSDL), Simple Object Access Protocol (SOAP), and Universal Description, Discovery, and
Integration(UDDI).
SOA is emerging as the premier integration and architecture framework in today's complex and
heterogeneous computing environment. Previous attempts didn't enable open interoperable solutions, but
relied on proprietary APIs and required a high degree of coordination between groups. SOA can help
organizations streamline processes so that they can do business more efficiently, and adapt to changing
needs and competition, enabling the software as a service concept. eBay for example, is opening up its
web services API for its online auction. The goal is to drive developers to make money around the eBay
platform. Through the new APIs, developers can build custom applications that link to the online auction
site and allow applications to submit items for sale. Such applications are typically aimed at sellers, since
buyers must still head to ebay.com to bid on items. This type of strategy, however, will increase the
customer base for eBay.
SOA and web services are two different things, but web services are the preferred standards-based way to
realize SOA.
Service-Oriented Architecture
SOA is an architectural style for building software applications that use services available in a network
such as the web. It promotes loose coupling between software components so that they can be reused.
Applications in SOA are built based on services. A service is an implementation of well-defined business
functionality, and such services can then be consumed by clients in different applications or business
processes.
SOA allows for the reuse of existing assets where new services can be created from an existing IT
infrastructure of systems. In other words, it enables businesses to leverage existing investments by
allowing them to reuse existing applications, and promises interoperability between heterogeneous
applications and technologies. SOA provides a level of flexibility that wasn't possible before in the sense
that:
Services are software components with well-defined interfaces that are implementation-independent.
An important aspect of SOA is the separation of the service interface (the what) from its
implementation (the how). Such services are consumed by clients that are not concerned with how
these services will execute their requests.
Services are self-contained (perform predetermined tasks) and loosely coupled (for independence)
Services can be dynamically discovered
71
MC5012/ Service Oriented Architecture MCA 2019-2020
72
MC5012/ Service Oriented Architecture MCA 2019-2020
Unit – III
5. Explain in detail about SOAP protocol and the message structure briefly.
SOAP:
i. SOAP stands for Simple Object Access Protocol
ii. SOAP is a communication protocol
iii. SOAP is for communication between applications
iv. SOAP is a format for sending messages
v. SOAP communicates via Internet
vi. SOAP is platform independent
vii. SOAP is language independent
viii. SOAP is based on XML
ix. SOAP is simple and extensible
x. SOAP allows you to get around firewalls
xi. SOAP is a W3C recommendation
Message structure:
A SOAP message is an ordinary XML document containing the following elements.
Envelope:(Mandatory)
Defines the start and the end of the message.
Each message can contain a header, an area dedicated to hosting Meta information. In
most service-oriented solutions, this header section is a vital part of the overall architecture, and
though optional, it is rarely omitted. Its importance relates to the use of header blocks through
which numerous extensions can be implemented (as described next).
The actual message contents are hosted by the message body, which typically consists of
XML formatted data. The contents of a message body are often referred to as the message
payload.
Header:(Optional)
A primary characteristic of the SOAP communications framework used by SOAs is an
emphasis on creating messages that are as intelligence-heavy and self-sufficient as possible. This
results in SOAP messages achieving a level of independence that increases the robustness and
extensibility of this messaging framework qualities that are extremely important when relying on
communication within the loosely coupled environment that Web services require.
Message independence is implemented through the use of header blocks, packets of
supplementary Meta information stored in the envelope's header area. Header blocks outfit a
message with all of the information required for any services with which the message comes in
contact to process and route the message in accordance with its accompanying rules, instructions,
and properties.
What this means is that through the use of header blocks, SOAP messages are capable of
containing a large variety of supplemental information related to the delivery and processing of
message contents.
This alleviates services from having to store and maintain message-specific logic. It further
reinforces the characteristics of contemporary SOA related to fostering reuse, interoperability, and
composability. Web services can be designed with generic processing functionality driven by
various types of Meta information the service locates in the header blocks of the messages it
receives.
The use of header blocks has elevated the Web services framework to an extensible and
composable enterprise-level computing platform. Practically all WS-* extensions are implemented
using header blocks.
Examples of the types of features a message can be outfitted with using header blocks include
processing instructions that may be executed by service intermediaries or the ultimate receiver
routing or workflow information associated with the message security measures implemented in
73
MC5012/ Service Oriented Architecture MCA 2019-2020
the message reliability rules related to the delivery of the message context and transaction
management information correlation information (typically an identifier used to associate a request
message with a response message)
These and many other features are available, and the selection is continually growing.
Because header blocks can be based on the use of different supplementary extensions, SOAP
allows the recognition and processing of header blocks to be marked as optional.
Body:(Mandatory)
Contains the XML data comprising the message being sent.
Fault:(Optional)
An optional Fault element that provides information about errors that occurred while processing
the message
All these elements are declared in the default namespace for the SOAP envelope
74
MC5012/ Service Oriented Architecture MCA 2019-2020
75
MC5012/ Service Oriented Architecture MCA 2019-2020
SOAP BASICS:
76
MC5012/ Service Oriented Architecture MCA 2019-2020
77
MC5012/ Service Oriented Architecture MCA 2019-2020
A business or company can register three types of information into a UDDI registry. This information is
contained into three elements of UDDI.
These three elements are :
(1) White pages:
This category contains:
← Basic information about the Company and its business.
← Basic contact information including business name, address, contact phone number etc.
← A unique identifiers for the company tax IDs. This information allows others to discover your
web service based upon your business identification.
(2) Yellow pages:
This category contains:
← This has more details about the company, and includes descriptions of the kind of electronic
capabilities the company can offer to anyone who wants to do business with it.
← It uses commonly accepted industrial categorization schemes, industry codes, product codes,
business identification codes and the like to make it easier for companies to search through the
listings and find exactly what they want.
(3) Green pages:
This category contains technical information about a web service. This is what allows someone to bind to
a Web service after it's been found. This includes:
← The various interfaces
← The URL locations
← Discovery information and similar data required to find and run the Web service.
NOTE: UDDI is not restricted to describing web services based on SOAP. Rather, UDDI can be used to
describe any service, from a single web page or email address all the way up to SOAP, CORBA, and Java
RMI services.
UDDI Data Model
UDDI includes an XML Schema that describes four five data structures:
← businessEntity
← businessService
← bindingTemplate
← tModel
← publisherAssertion
businessEntity data structure:
The business entity structure represents the provider of web services. Within the UDDI registry, this
structure contains information about the company itself, including contact information, industry
categories, business identifiers, and a list of services provided.
Here is an example of a fictitious business's UDDI registry entry:
<businessEntity businessKey="uuid:C0E6D5A8-C446-4f01-99DA-70E212685A40"
operator="http://www.ibm.com"
authorizedName="John Doe">
<name>Acme Company</name>
<description>
We create cool Web services
</description>
<contacts>
<contact useType="general info">
<description>General Information</description>
<personName>John Doe</personName>
<phone>(123) 123-1234</phone>
<email>jdoe@acme.com</email>
</contact>
78
MC5012/ Service Oriented Architecture MCA 2019-2020
</contacts>
<businessServices>
...
</businessServices>
<identifierBag>
<keyedReference
tModelKey="UUID:8609C81E-EE1F-4D5A-B202-3EB13AD01823"
name="D-U-N-S"
value="123456789" />
</identifierBag>
<categoryBag>
<keyedReference
tModelKey="UUID:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2"
name="NAICS"
value="111336" />
</categoryBag>
</businessEntity>
79
MC5012/ Service Oriented Architecture MCA 2019-2020
<overviewDoc>
<description>
references the description of the
WSDL service definition
</description>
<overviewURL>
http://localhost/helloworld.wsdl
</overviewURL>
</overviewDoc>
</instanceDetails>
</tModelInstanceInfo>
</tModelInstanceDetails>
</bindingTemplate>
Because a business service may have multiple binding templates, the service may specify different
implementations of the same service, each bound to a different set of protocols or a different network
address.
The publisherAssertion structure consists of the three elements fromKey (the first businessKey), toKey
(the second businessKey) and keyedReference.
The keyedReference designates the asserted relationship type in terms of a keyName keyValue pair within
a tModel, uniquely referenced by a tModelKey.
80
MC5012/ Service Oriented Architecture MCA 2019-2020
<complexType name="publisherAssertion">
<sequence>
<element ref="uddi:fromKey" />
<element ref="uddi:toKey" />
<element ref="uddi:keyedReference" />
</sequence>
</complexType>
5. Describe in detail about the following: i) SOAP and actors ii) SOAP Faults
i) SOAP and actors
The SOAP actor global attribute can be used to indicate the recipient of a header element. The value
of the SOAP actor attribute is a URI. The special URI "http://schemas.xmlsoap.org/soap/actor/next"
indicates that the header element is intended for the very first SOAP application that processes the
message. This is similar to the hop-by-hop scope model represented by the Connection header field in
HTTP.
Omitting the SOAP actors attribute indicates that the recipient is the ultimate destination of the SOAP
message.
This attribute MUST appear in the SOAP message instance in order to be effective.
The following list covers the rules a well-behaved SOAP server must follow when receiving a SOAP
message:
Identify the parts of the header intended for that application. This means checking the header for
an actor attribute that is either the URI of the application or the URI
"http://schemas.xmlsoap.org/soap/actor/next", which means that the application must process the
header.
Verify that all parts of the header intended for the application and associated with a
mustUnderstand=”true” attribute are supported by the application. If the application cannot process the
message, then it must discard the message and return a SOAP fault.
Process the parts of the header intended for the application. If there are elements that include the
attribute mustUnderstand=”false” or that do not specify the mustUnderstand attribute, then the
application must ignore those elements.
If the application is not the ultimate destination of the message, then it must remove all header
elements intended for it before forwarding the message.
ii) SOAP Faults
The Fault element
– The optional Fault construct provides a readymade error response that is added inside the Body
construct. In the example that follows, this fault information is further sub-divided using additional child
elements. The faultcode element contains one of a set of fault conditions predefined by the SOAP
specification. Both the faultstring and detail elements provide human readable error messages
– The Fault construct residing within the Body construct.
<Body>
<Fault>
<faultcode>
MustUnderstand
</faultcode>
<faultstring>
header was not recognized
</faultstring>
<detail>
<x:appMessage xmlns:x=
"http://www.xmltc.com/tls/faults">
81
MC5012/ Service Oriented Architecture MCA 2019-2020
The CorrelationID header was not processed by a recipient that was required to process it. Now a fault's
been raised and it looks like this
recipient is going to be a problem. </x:appMessage> </detail> </Fault>
Explain how request and response messages are implemented in XML-RPC (Nov 2017)
ii)XML-RPC
XML-RPC, which does remote procedure calls over the Internet, is a great example of out-of-the-box
thinking. In confronting the communication problem of how a program on machine A can get some code
on machine B to run, XML-RPC ignores the difficulty entirely and delegates the transport to HTTP,
focusing instead on the details of what to say, not how to get the message there.
Data Typing
XML-RPC uses XML Schema data types to specify the parameter types of the procedure call. Data types
include scalars, numbers, strings, and dates, as well as complex record and list structure.
The XML-RPC specification places a number of minimal requirements on the XML, including the
following:
• The XML payload must be well-formed XML and contain a single method Call structure.
• The method Call element must contain a method Name sub-item consisting of a string that names the
method to be called.
• If parameters are required, the method Call element must contain a params sub-items that contains
individual param elements, each of which contains a single value.
XML-RPC Responses
The job of the server is to process the XML-RPC request for the execution of some piece of code and
return a value to the client.
XML-RPC specifies that the response to a procedure call must be a single XML structure, a method
Response, which can contain either the return value packaged in a single params element or a fault
element which contains information about why the fault occurred.
82
MC5012/ Service Oriented Architecture MCA 2019-2020
Attachments
The SOAP with attachments document defines a binding for a SOAP message to be carried within a
Multi-Purpose Internet Mail Extensions (MIME) multipart/related message in such a way that processing
rules for SOAP messages are preserved. The MIMIE multipart mechanism for encapsulation of
compound documents can be used to bundle entities related to the SOAP message, such as attachments.
SOAP and Firewalls
Soap’s global reach is made possible by its alliance with HTTP, the Internet protocol that is the basis for
moving data back and forth from Web servers to browsers. .HTTP works by accessing Web servers on
port 80, which is kept open for Web traffic.
The W3C and SOAP
The XML Protocol Working Group is W3C group formed in response to the submission of the SOAP1.1
specifications as the basis for a universal XML-based protocol. The goal of the XML Protocol Working
Group is the creation of simple protocols that can be deployed across the Web and easily programmed
through scripting languages, XML and Web tools.
Taking SOAP to the Next Level
Going beyond the simple use of SOAP to exchange data, several options are emerging that use SOAP as
their base protocol. Other options include Electronic Business XML and Web services.
9. List the SOAP intermediaries & illustrate message path is determined at runtime /
What are SOAP intermediaries? Explain it with example. (Nov 2017)
SOAP Intermediaries:
Intermediaries
83
MC5012/ Service Oriented Architecture MCA 2019-2020
o The communications framework established by Web services contrasts the predictable nature of
traditional point-to-point communications channels.
o Web services communication is based on the use of messaging paths, which can best be described as
point-to-* paths. This is because once a service provider submits a message, it can be processed by
multiple intermediate routing and processing agents before it arrives at its ultimate destination.
Figure: The intermediary service transitions through service provider and service requestor roles while
processing a message.
There are two types of intermediaries. The first, known as a passive intermediary, is typically responsible
for routing messages to a subsequent location. It may use information in the SOAP message header to
determine the routing path, or it may employ native routing logic to achieve some level of load balancing.
Either way, what makes this type of intermediary passive is that it does not modify the message. The
Second, known as a active intermediary.
Figure: A passive intermediary service processing a message without altering its contents.
84
MC5012/ Service Oriented Architecture MCA 2019-2020
Service compositions
This particular term does not apply to a single Web service, but to a composite relationship between
collections of services.
Any service can enlist one or more additional services to complete a given task. Further, any of the
enlisted services can call other services to complete a given sub-task. Therefore, each service that
participates in a composition assumes an individual role of service composition member
_ SOAP Intermediaries are an essential aspect of building scalable web based distributed system
_ A SOAP compliant server must be able to act as a SOAP intermediary capable of processing and
forwarding SOAP Message
_ SOAP intermediaries are specified by their URIS
Syntax:
<SOAP_ENV: Header
SOAP_ENV:actor-http://yourserver.com
….>
SOAP & ACTORS:
_ If SOAP actor attribute is not present in a header, then recipient of message is the final destination,
while receiving SOAP Message.
_ Identify parts of message intended for application
_ Process it
_ If parts of message could not be identified, it’s ignored.
SOAP FAULTS
Faults occur when application couldn’t understand soap message. Soap
faults are
• Fault code
• Fault string
• Detail
85
MC5012/ Service Oriented Architecture MCA 2019-2020
86
MC5012/ Service Oriented Architecture MCA 2019-2020
Web Services Description Language (WSDL) is an XML grammar for describing network services as
collections of communication endpoints capable of exchanging messages. The diagram below illustrates
the elements that are present in a WSDL document, and indicates their relationships. To see an example of
how this is implemented in a WSDL document.
WSDL Document Elements
A WSDL document has a definitions element that contains the other five elements, types, message,
portType, binding and service. The following sections describe the features of the generated client code.
WSDL supports the XML Schemas specification (XSD) as its type system.
definitions
Contains the definition of one or more services. JDeveloper generates the following attribute
declarations for this section:
name is optional.
targetNamespace is the logical namespace for information about this service. WSDL
documents can import other WSDL documents, and setting targetNamespace to a unique
value ensures that the namespaces do not clash.
xmlns is the default namespace of the WSDL document, and it is set
to http://schemas.xmlsoap.org/wsdl/.
All the WSDL elements, such as <definitions>, <types> and <message> reside in this
namespace.
xmlns:xsd and xmlns:soap are standard namespace definitions that are used for
specifying SOAP-specific information as well as data types.
xmlns:tns stands for this namespace.
xmlns:ns1 is set to the value of the schema targetNamespace, in the <types> section.
Notice that the default of http://tempuri.org in namespaces to ensure that the namespaces are
unique.
Types It provides information about any complex data types used in the WSDL document. When
simple types are used the document does not need to have a types section. It provides data type
definitions used to describe the messages exchanged.
Message An abstract definition of the data being communicated. In the example, the message
contains just one part, response, which is of type string, where string is defined by the XML
Schema. It is an abstract definition of the data being transmitted. A message consists of logical
parts, each of which is associated with a definition within some type system.
87
MC5012/ Service Oriented Architecture MCA 2019-2020
portType An abstract set of operations supported by one or more endpoints. It is a set of abstract
operations. Each operation refers to an input message and output messages.
Binding Describes how the operation is invoked by specifying concrete protocol and data format
specifications for the operations and messages.
Port Specifies a single endpoint as an address for the binding, thus defining a single
communication endpoint. is a set of abstract operations. Each operation refers to an input
message and output messages.
Service Specifies the port address(es) of the binding. The service is a collection of network endpoints or
ports.
WSDL Document Structure
A WSDL document is simply a set of definitions. There is a definitions element at the root, and
definitions inside. The grammar is as follows:
<wsdl:definitions name="nmtoken"? targetNamespace="uri"?>
<wsdl:types> ?
<wsdl:documentation .... />?
<xsd:schema .... />*
<-- extensibility element --> *
</wsdl:types>
<wsdl:message name="nmtoken"> *
<wsdl:documentation .... />?
<part name="nmtoken" element="qname"? type="qname"?/> *
</wsdl:message>
<wsdl:portType name="nmtoken">*
88
MC5012/ Service Oriented Architecture MCA 2019-2020
<wsdl:service name="nmtoken"> *
<wsdl:documentation .... />?
<wsdl:port name="nmtoken" binding="qname"> *
<wsdl:documentation .... /> ?
<-- extensibility element -->
</wsdl:port>
<-- extensibility element -->
</wsdl:service>
</wsdl:definitions>
89
MC5012/ Service Oriented Architecture MCA 2019-2020
90
MC5012/ Service Oriented Architecture MCA 2019-2020
The WSDL service element references the WSDL binding element. The URL of the document containing
the WSDL binding element is published to the UDDI business registry as a tModel. The URL of the
document containing the WSDL service element is published to the UDDI business registry as a
businessService and contains information about the bindingTemplate. For more information on UDDI
registry data structure types, refer to the related reference section at the end of this document. Note that
the import portion of the diagram is optional depending on the run-time environment; monolithic WSDL
such as that created using the Axis run-time environment does not have imports.
The service implementation describes an instance of a service. The instance is defined using a WSDL
service element. The service element in a service implementation document is used to publish a UDDI
businessService. When publishing a WSDL service description, a service interface must be published as a
tModel before a service implementation is published as a businessService.
A service implementation is published in a UDDI registry as part of a businessService with one or more
bindingTemplate elements. The businessService is published by the service provider. A new
businessService is created for a service element that is defined in the service implementation document. A
new bindingTemplate element is created within a businessService for each port element that is defined
within a service element.
12. Explain how SOAP protocol supports data exchange across the web. (Nov 2016)
SOAP (Simple Object Access Protocol) is a messaging protocol that allows programs that run on
disparate operating systems (such as Windows and Linux) to communicate using Hypertext Transfer
Protocol (HTTP) and its Extensible Markup Language (XML). Since Web protocols are installed and
available for use by all major operating system platforms, HTTP and XML provide an at-hand solution
that allows programs running under different operating systems in a network to communicate with each
other. SOAP specifies exactly how to encode an HTTP header and an XML file so that a program in one
computer can call a program in another computer and pass along information. SOAP also specifies how
the called program can return a response. Despite its frequent pairing with HTTP, SOAP supports other
transport protocols as well.
SOAP defines the XML-based message format that Web service-enabled applications use to communicate
and inter-operate with each other over the Web. The heterogeneous environment of the Web demands that
applications support a common data encoding protocol and message format. SOAP is a standard for
encoding messages in XML that invoke functions in other applications. SOAP is analogous to Remote
Procedure Calls (RPC), used in many technologies such as DCOM and CORBA, but eliminates some of
the complexities of using these interfaces. SOAP enables applications to call functions from other
applications, running on any hardware platform, regardless of different operating systems or
programming languages.
91
MC5012/ Service Oriented Architecture MCA 2019-2020
SOAP calls are much more likely to get through firewall servers, since HTTP is typically Port
80 compliant, where other calls may be blocked for security reasons. Since HTTP requests are usually
allowed through firewalls, programs using SOAP to communicate can be sure that the program can
communicate with programs anywhere
Some of the advantages of leveraging SOAP include:
It is platform and language independent.
SOAP provides simplified communications through proxies and firewalls, as mentioned above.
It has the ability to leverage different transport protocols, including HTTP and SMTP, as well as
others.
Some disadvantages of leveraging SOAP include:
SOAP is typically much slower than other types of middleware standards, including CORBA.
This due to the fact that SOAP uses a verbose XML format. You need to fully understand the
performance limitations before building applications around SOAP.
SOAP is typically limited to pooling, and not event notifications, when leveraging HTTP for
transport. What's more, only one client can use the services of one server in typical situations.
Again, when leveraging HTTP as the transport protocol, there tends to be firewall latency due to
the fact that the firewall is analyzing the HTTP transport. This is due to the fact that HTTP is also
leveraged for Web browsing, and many firewalls do not understand the difference between the use of
HTTP within a Web browser, and the use of HTTP within SOAP.
SOAP has different levels of support, depending upon the programming language supported. For
example, SOAP support within Python and PHP is not as strong as it is within Java and .NET
92
MC5012/ Service Oriented Architecture MCA 2019-2020
Unit – IV
1. Explain briefly about Service agents processing incoming and outgoing SOAP message headers.
Service agents
A type of software program commonly found within the message processing logic of SOA platforms is
the service agent. Its primary role is to perform some form of automated processing prior to the
transmission and receipt of SOAP messages. As such, service agents are a form of intermediary service.
For example, service agents that reside alongside the service requestor will be engaged after a SOAP
message request is issued by the service requestor and before it actually is transmitted to the service
provider. Similarly, requestor agents generally kick in upon the initial receipt of a SOAP response, prior to
the SOAP message being received by the remaining service requestor logic.
The same goes for service agents that act on the service provider's behalf. They typically pre-process
SOAP request messages and intercept SOAP response messages prior to transmission.
Service agents usually address cross-cutting concerns, providing generic functions to alleviate the
processing responsibilities of core Web service logic. Examples of the types of tasks performed by service
agents include:
SOAP header processing
filtering (based on SOAP header or payload content)
authentication and content-based validation
logging and auditing
routing
Service agents processing incoming and outgoing SOAP message headers.
An agent program usually exists as a lightweight application with a small memory footprint. It typically is
provided by the runtime but also can be custom developed.
2. Discuss about Contemporary SOA support
Extending an SOA beyond the primitive boundary requires a combination of design and available
technology in support of the design. Because WS-* extensions have not yet been standardized by the
vendor-neutral J2EE platform, they require the help of vendor-specific tools and features.
Based on open standards
The Web services subset of the J2EE platform supports industry standard Web services specifications,
including WSDL, SOAP, and UDDI. Support for the WS-I Basic Profile also has been provided. Further,
the API specifications that comprise the J2EE platform are themselves open standards, which further
promotes vendor diversity.
Supports vendor diversity
Adherence to the vanilla J2EE API standards has allowed for a diverse vendor marketplace to emerge.
Java application logic can be developed with one tool and then ported over to another. Similarly, Java
components can be designed for deployment mobility across different J2EE server products.
93
MC5012/ Service Oriented Architecture MCA 2019-2020
Further, by designing services to be WS-I Basic Profile compliant, vendor diversity beyond J2EE
platforms is supported. For example, an organization that has built an SOA based on J2EE technology
may choose to build another using the .NET framework. Both environments can interoperate if their
respective services conform to the same open standards. This also represents vendor diversity.
Intrinsically interoperable
Interoperability is, to a large extent, a quality deliberately designed into a Web service. Aside from service
interface design characteristics, conformance to industry-standard Web services specifications is critical
to achieving interoperable SOAs, especially when interoperability is required across enterprise domains.
As of version 1.1, the JAX-RPC API is fully capable of creating WS-I Basic Profile-compliant Web
services. This furthers the vision of producing services that are intrinsically interoperable. Care must be
taken, though, to prevent the use of handlers from performing runtime processing actions that could
jeopardize this compliance.
Promotes federation
Strategically positioned services coupled with adapters that expose legacy application logic can establish
a degree of federation. Building an integration architecture with custom business services and legacy
wrapper services can be achieved using basic J2EE APIs and features. Supplementing such an
architecture with an orchestration server further increases the potential of unifying and standardizing
integrated logic.
Also worth taking into consideration is the J2EE Connector Architecture (JCA), a structured, adapter-
centric integration architecture through which resource adapters are used to bridge gaps between J2EE
platforms and other environments. As with JMS, JCA is traditionally centred on the use of proprietary
messaging protocols and platform-specific adapters. Recently, however, support for asynchronous and
SOAP messaging has been introduced. Further, service adapters have been made available to tie JCA
environments into service-oriented solutions.
Numerous integration server platforms also are available to support and implement the overall concept of
enterprise-wide federation. Depending on the nature of the integration architecture, service-oriented
integration environments are built around orchestration servers or enterprise service bus (or both).
Architecturally composable
Given the modular nature of supporting API packages and classes and the choice of service-specific
containers, the J2EE platform is intrinsically composable. This allows solution designers to use only the
parts of the platform required for a particular application. For example, a Web services solution that only
consists of JAX-RPC Service Endpoints will likely not have a need for the JMS class packages or a J2EE
SOA that does not require a service registry will not implement any part of the JAXR API.
With regards to taking advantage of the composable contemporary SOA landscape, the J2EE platform, in
its current incarnation, does not yet provide native support for WS-* specifications. Instead, extensions
are supplied by product vendors that implement and build upon J2EE standards. The extent to which the
WS-* features of an SOA based on the J2EE platform can be composed is therefore currently dependent
upon the vendor-specific platform used.
Extensibility
As with any service-oriented solution, those based on the J2EE platform can be designed with services
that support the notion of future extensibility. This comes down to fundamental design characteristics that
impose conventions and structure on the service interface level.
Because J2EE environments are implemented by different vendors, extensibility can sometimes lead to
the use of proprietary extensions. While still achieving extensibility within the vendor environment, this
can limit the portability and openness of Java solutions.
Supports service-oriented business modeling
Beyond consistent and standardized design approaches to building service layers along the lines of the
application, entity, and task-centric services we've established in previous chapters, there is no inherent
support for service-oriented business modeling within J2EE.
This is primarily because the concept of orchestration is not a native part of the J2EE platform.
94
MC5012/ Service Oriented Architecture MCA 2019-2020
Instead, orchestration services and design tools are provided by vendors to supplement the J2EE Web
services development and runtime environment. Service-oriented business modelling and the service
layers can be created with the right vendor tools.
Logic-level abstraction
JAX-RPC Service Endpoints and EJB Service Endpoints can be designed into service layers that abstract
application-specific or reusable logic. Further, entire J2EE solutions can be exposed through these types
of services, when appropriate.
Depending on the vendor server platform used, some limitations may be encountered when building
service compositions that require message-level security measures. These limitations may inhibit the
extent of feasible logic-level abstraction.
Organizational agility and enterprise-wide loose coupling
In past chapters we explored the enablement of enterprise-wide agility through the implementation of
abstraction via service sub-layers. The creation of these service layers is possible with the help of a
vendor-specific orchestration server. Although the orchestration offering is proprietary, the fact that other
Web services are J2EE standardized further promotes an aspect of agility realized through the vendor
diverse nature of the J2EE marketplace.
For example, if a vendor server platform is not satisfying current business needs and requires
replacement, application, entity-centric, and task-centric services likely will be sufficiently mobile so that
they can be used in the replacement environment. The orchestration logic may or may not be portable,
depending on whether a common orchestration language, such as WS-BPEL, was used to express the
process logic.
To attain a state where business and technology domains of an enterprise are loosely coupled and achieve
full, two-way agility, requires the fulfilment of a number of contemporary SOA characteristics identified
in this book. The J2EE platform provides a foundation upon which to build a standardized and extensible
SOA. Enterprise features offered by vendor platforms need to be incorporated to add layers on top of this
foundation necessary to driving service-orientation across the enterprise.
3. Discuss about J2EE handlers as service agents.
Service agents
Vendor implementations of J2EE platforms often employ numerous service agents to perform a variety of
runtime filtering, processing, and routing tasks. A common example is the use of service agents to process
SOAP headers.
To support SOAP header processing, the JAX-RPC API allows for the creation of specialized service
agents called handlers runtime filters that exist as extensions to the J2EE container environments.
Handlers can process SOAP header blocks for messages sent by J2EE service requestors or for messages
received by EJB Endpoints and JAX-RPC Service Endpoints.
J2EE handlers as service agents.
Multiple handlers can be used to process different header blocks in the same SOAP message. In this case
the handlers are chained in a predetermined sequence (appropriately called a handler chain).
95
MC5012/ Service Oriented Architecture MCA 2019-2020
Dynamic proxy and dynamic invocation interface of the generated stub are also supported. The dynamic
proxy is similar in concept, except that the actual stub is not created until its methods are invoked at
runtime. Secondly, the dynamic invocation interface bypasses the need for a physical stub altogether and
allows for fully dynamic interaction between a Java component and a WSDL definition at runtime.
96
MC5012/ Service Oriented Architecture MCA 2019-2020
The latter options are more suited for environments in which service interfaces are more likely to change
or for which component interaction needs to be dynamically determined. For example, because a
generated stub produces a static proxy interface, it can be rendered useless when the corresponding
WSDL definition changes. Dynamic proxy generation avoids this situation.
6. Explain briefly about Creating a Simple Web Service and Client with JAX-WS.
Creating a Simple Web Service and Clients with JAX-WS
This section shows how to build and deploy a simple web service and two clients: an application client
and a web client. The source code for the service is in thetut-
install/examples/jaxws/helloservice/ directory, and the clients are in the tut-
install/examples/jaxws/appclient/ and tut-install/examples/jaxws/webclient/ directories.
Figure 19-1 Communication between a JAX-WS Web Service and a Client
The starting point for developing a JAX-WS web service is a Java class annotated with
the javax.jws.WebService annotation. The @WebService annotation defines the class as a web service
endpoint.
A service endpoint interface or service endpoint implementation (SEI) is a Java interface or class,
respectively, that declares the methods that a client can invoke on the service. An interface is not required
when building a JAX-WS endpoint. The web service implementation class implicitly defines an SEI.
You may specify an explicit interface by adding the endpointInterface element to
the @WebService annotation in the implementation class. You must then provide an interface that defines
the public methods made available in the endpoint implementation class.
The basic steps for creating a web service and client are as follows:
1. Code the implementation class.
2. Compile the implementation class.
3. Package the files into a WAR file.
4. Deploy the WAR file. The web service artifacts, which are used to communicate with clients, are
generated by the GlassFish Server during deployment.
5. Code the client class.
6. Use a wsimport Ant task to generate and compile the web service artifacts needed to connect to the
service.
7. Compile the client class.
8. Run the client.
Building, Packaging, and Deploying the Service
You can use either NetBeans IDE or Ant to build, package, and deploy the helloservice application.
To Build, Package, and Deploy the Service Using NetBeans IDE
1. From the File menu, choose Open Project.
2. In the Open Project dialog, navigate to: tut-install/examples/jaxws/
3. Select the helloservice folder.
4. Select the Open as Main Project check box.
5. Click Open Project.
6. In the Projects tab, right-click the helloservice project and select Deploy.
This command builds and packages the application into helloservice.war, located in tut-
install/examples/jaxws/helloservice/dist/, and deploys this WAR file to the GlassFish
URL http://localhost:8080/helloservice/HelloService?wsdl in a web browser. Now you are ready to create
a client that accesses this service.
To Build, Package, and Deploy the Service Using Ant
1. In a terminal window, go to: tut-install/examples/jaxws/helloservice/
97
MC5012/ Service Oriented Architecture MCA 2019-2020
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println(sayHello("world"));
}
98
MC5012/ Service Oriented Architecture MCA 2019-2020
99
MC5012/ Service Oriented Architecture MCA 2019-2020
JAXB:
JAXB is Java Architecture for XML Binding
SAX and DOM are generic XML parsers
They will parse any well-structured XML
JAXB creates a parser that is specific to your DTD
A JAXB parser will parse only valid XML (as defined by your DTD)
DOM and JAXB both produce a tree in memory
DOM produces a generic tree; everything is a Node
JAXB produces a tree of Objects with names and attributes as described by your DTD
Advantages:
JAXB requires a DTD
Using JAXB ensures the validity of your XML
A JAXB parser is actually faster than a generic SAX parser
A tree created by JAXB is smaller than a DOM tree
It’s much easier to use a JAXB tree for application-specific code
You can modify the tree and save it as XML
Disadvantages:
JAXB requires a DTD
Hence, you cannot use JAXB to process generic XML (for example, if you are
writing an XML editor or other tool)
You must do additional work up front to tell JAXB what kind of tree you want it to
construct
But this more than pays for itself by simplifying your application
JAXB takes as input two files: your DTD and a binding schema (which you also write)
A binding schema is an XML document written in a “binding language” defined by
JAXB (with extension .xjs)
A binding schema is used to customize the JAXB output
Your binding schema can be very simple or quite complex
JAXB produces as output Java source code which you compile and add to your program
Your program will uses the specific classes generated by JAXB
Your program can then read and write XML files
JAXB also provides an API for working directly with XML
100
MC5012/ Service Oriented Architecture MCA 2019-2020
An Example:
The DTD: <!ELEMENT book (title, author, chapter+) >
<!ELEMENT title (#PCDATA) >
<!ELEMENT author (#PCDATA)>
<!ELEMENT chapter (#PCDATA) >
The schema: <xml-java-binding-schema>
<element name="book" type="class" root="true" />
</xml-java-binding-schema>
8. Explain briefly about JAXR Architecture.
JAXR:
JAXR provides a uniform and standard Java API for accessing XML registries.
JAXR Concept
A naming service allows a name to be associated with an object and the object to be located by
that name.
Core JAXR
The JAXR architecture is based on the concept of pluggable providers. JAXR provides a layer of
abstraction to developers. Developers write applications using a standand JAXR client API and a
standard JAXR information model to interact with business registries of UDDI and ebXML.
JAXR has two capability levels:
o level 0: support for UDDI registry
o level 1: support for an ebXML and UDDI registry
The Java API for XML Registries (JAXR) provides a uniform and standard Java API for accessing
various kinds of XML registries. After providing a brief overview of JAXR, this chapter describes how to
implement a JAXR client to publish an organization and its web services to a registry and to query a
registry to find organizations and services. Finally, it explains how to run the examples provided with this
tutorial and offers links to more information on JAXR.
• The high-level architecture of JAXR consists of the following parts:
– A JAXR client: This is a client program that uses the JAXR API to access a business registry via a
JAXR provider.
– A JAXR provider: This is an implementation of the JAXR API that provides access to a specific registry
provider or to a class of registry providers that are based on a common specification.
• A JAXR provider implements two main packages:
– javax.xml.registry, which consists of the API interfaces and classes that define the registry access
interface.
– javax.xml.registry.infomodel, which consists of interfaces that define the information model for JAXR.
These interfaces define the types of objects that reside in a registry and how they relate to each other. The
basic interface in this package is the RegistryObject interface. Its subinterfaces include Organization,
Service, and ServiceBinding.
• The most basic interfaces in the javax.xml.registry package are
– Connection. The Connection interface represents a client session with a registry provider. The client
must create a connection with the JAXR provider in order to use a registry.
– RegistryService. The client obtains a RegistryService object from its connection. The RegistryService
object in turn enables the client to obtain the interfaces it uses to access the registry.
• The primary interfaces, also part of the javax.xml.registry package, are
– BusinessQueryManager, which allows the client to search a registry for information in accordance with
the javax.xml.registry.infomodel interfaces. An optional interface, DeclarativeQueryManager, allows the
client to use SQL syntax for queries. (The implementation of JAXR in the Application Server does not
implement DeclarativeQueryManager.)
101
MC5012/ Service Oriented Architecture MCA 2019-2020
– BusinessLifeCycleManager, which allows the client to modify the information in a registry by either
saving it (updating it) or deleting it.
When an error occurs, JAXR API methods throw a JAXRException or one of its subclasses.Many
methods in the JAXR API use a Collection object as an argument or a returned value. Using a Collection
object allows operations on several registry objects at a time. Figure 6–1 illustrates the architecture of
JAXR. In the Application Server, a JAXR client uses the capability level 0 interfaces of the JAXR API to
access the JAXR provider. The JAXR provider in turn accesses a registry. The Application Server
supplies a JAXR provider for UDDI registries.
9. How SOA is supported in .NET environment? Give an example for service creation
and invocation in .NET ?
Discuss about typical .NET service provider and .NET service requester. (Nov 2017 )
Service providers
.NET service providers are Web services that exist as a special variation of ASP.NET applications, called
ASP.NET Web Services. You can recognize a URL pointing to an ASP.NET Web Service by the ".asmx"
extension used to identify the part of the service that acts as the endpoint. ASP.NET Web Services can
exist solely of an ASMX file containing inline code and special directives, but they are more commonly
comprised of an ASMX endpoint and a compiled assembly separately housing the business logic.
102
MC5012/ Service Oriented Architecture MCA 2019-2020
Service requestors
To support the creation of service requestors, .NET provides a proxy class that resides alongside the
service requestor's application logic and duplicates the service provider interface. This allows the service
requestor to interact with the proxy class locally, while delegating all remote processing and message
marshalling activities to the proxy logic.
The .NET proxy translates method calls into HTTP requests and subsequently converts the response
messages issued by the service provider back into native method return calls.
The code behind a proxy class is auto-generated using Visual Studio or the WSDL.exe command line
utility. Either option derives the class interface from the service provider WSDL definition and then
compiles the proxy class into a DLL.
A typical .NET service requestor.
103
MC5012/ Service Oriented Architecture MCA 2019-2020
• Forms are event driven and event describe the idea that something happened
• A event is generated when a user clicks a button or selects a list box or otherwise interacts with the user
interface
• The method that responds to the event is called event handler in C# code and associated with the control
in the HTML page through control properties
• ASP.NET event handler returns void and takes two parameters
• Object raising the event
• Event Argument [ information specific to the event ]
• Web Application handle events on the server and therefore require a round trip
ASP.NET supports a limited number of events like button click and text changes
POST BACK vs NON POST BACK EVENTS:
• Post Back events are those that cause forms to be posted back to the server immediately
– This event sends the page to server for processing. This causes the page a round-trip to the server.
– These events include click type events like button type events
• Non Post Back events are those not posted back to the server immediately , instead these are cached by
the control until the next time a post back event occurs
STATE:
• The Web application state is the current value of all the controls and variables for the current user in the
current session
• A web is inherently a stateless environment
– A stateless server is a server that treats each request as an independent transaction that is unrelated to
any previous request.
11. Highlight the features of java based API used for SOA (Jan ’16 & Nov 2016)
Service-oriented architecture (SOA) is an evolution of distributed computing based on the request/reply
design paradigm for synchronous and asynchronous applications. An application's business logic or
individual functions are modularized and presented as services for consumer/client applications. What's
key to these services is their loosely coupled nature; i.e., the service interface is independent of the
implementation. Application developers or system integrators can build applications by composing one or
more services without knowing the services' underlying implementations. For example, a service can be
implemented either in .Net or J2EE, and the application consuming the service can be on a different
platform or language.
Service-oriented architectures have the following key characteristics:
SOA services have self-describing interfaces in platform-independent XML documents. Web
Services Description Language (WSDL) is the standard used to describe the services.
SOA services communicate with messages formally defined via XML Schema (also called XSD).
Communication among consumers and providers or services typically happens in heterogeneous
environments, with little or no knowledge about the provider. Messages between services can be
viewed as key business documents processed in an enterprise.
104
MC5012/ Service Oriented Architecture MCA 2019-2020
SOA services are maintained in the enterprise by a registry that acts as a directory listing.
Applications can look up the services in the registry and invoke the service. Universal Description,
Definition, and Integration (UDDI) is the standard used for service registry.
Each SOA service has a quality of service (QoS) associated with it. Some of the key QoS elements
are security requirements, such as authentication and authorization, reliable messaging, and policies
regarding who can invoke services.
Why SOA?
The reality in IT enterprises is that infrastructure is heterogeneous across operating systems,
applications, system software, and application infrastructure. Some existing applications are used to run
current business processes, so starting from scratch to build new infrastructure isn't an option.
Enterprises should quickly respond to business changes with agility; leverage existing investments in
applications and application infrastructure to address newer business requirements; support new
channels of interactions with customers, partners, and suppliers; and feature an architecture that
supports organic business. SOA with its loosely coupled nature allows enterprises to plug in new
services or upgrade existing services in a granular fashion to address the new business requirements,
provides the option to make the services consumable across different channels, and exposes the existing
enterprise and legacy applications as services, thereby safeguarding existing IT infrastructure
investments.
SOA for cloud computing
Learn more about service-oriented architecture in the Java enterprise:
Logically SOA: An architecture overview
SOA for the real world
Secure SOA: What you need to know
Enterprise patterns for a lean SOA
As in Figure 1's example, an enterprise employing SOA could create a supply
chain composite application using a set of existing applications that expose the
functionality via standard interfaces.
105
MC5012/ Service Oriented Architecture MCA 2019-2020
106
MC5012/ Service Oriented Architecture MCA 2019-2020
most-once delivery, duplicate message elimination, guaranteed message delivery, and acknowledgment
become important in mission-critical systems using service architecture. WS-Reliability and WS-
ReliableMessaging are two standards that address the issues of reliable messaging. Both these
standards are now part of OASIS.
Policy
Service providers sometimes require service consumers to communicate with certain policies. As an
example, a service provider may require a Kerberos security token for accessing the service. These
requirements are defined as policy assertions. A policy may consist of multiple assertions. WS-Policy
standardizes how policies are to be communicated between service consumers and service providers.
Orchestration
As enterprises embark on service architecture, services can be used to integrate silos of data,
applications, and components. Integrating applications means that the process requirements, such as
asynchronous communication, parallel processing, data transformation, and compensation, must be
standardized. BPEL4WS or WSBPEL(Web Services Business Process Execution Language) is an
OASIS specification that addresses service orchestration, where business processes are created using a
set of discrete services. WSBPEL is now part of OASIS.
Management
As the number of services and business processes exposed as services grow in the enterprise, a
management infrastructure that lets the system administrators manage the services running in a
heterogeneous environment becomes important. Web Services for Distributed Management (WSDM)
will specify that any service implemented according to WSDM will be manageable by a WSDM-
compliant management solution.
Other QoS attributes such as coordination between partners and transactions involving multiple
services are being addressed in the WS-Coordination and WS-Transaction specifications, respectively,
which are OASIS efforts as well.
SOA is not Web services
There seems to be general confusion about the relationship between SOA and Web services. In an
April 2003 Gartner report, Yefim V. Natis states: "Web services are about technology specifications,
whereas SOA is a software design principle. Notably, Web services' WSDL is an SOA-suitable
interface definition standard: this is where Web services and SOA fundamentally connect."
Fundamentally, SOA is an architectural pattern, while Web services are services implemented using a
set of standards; Web services is one of the ways you can implement SOA. The benefit of
implementing SOA with Web services is that you achieve a platform-neutral approach to accessing
services and better interoperability as more and more vendors support more and more Web services
specifications.
Benefits of SOA
While the SOA concept is fundamentally not new, SOA differs from existing distributed technologies in
that most vendors accept it and have an application or platform suite that enables SOA. SOA, with a
ubiquitous set of standards, brings better reusability of existing assets or investments in the enterprise and
lets you create applications that can be built on top of new and existing applications. SOA enables
changes to applications while keeping clients or service consumers isolated from evolutionary changes
that happen in the service implementation. SOA enables upgrading individual services or services
consumers; it is not necessary to completely rewrite an application or keep an existing system that no
longer addresses the new business requirements. Finally, SOA provides enterprises better flexibility in
building applications and business processes in an agile manner by leveraging existing application
infrastructure to compose new services.
107
MC5012/ Service Oriented Architecture MCA 2019-2020
Unit – V
In all these cases, the discovery of such services is mostly done by human intervention: a person
(or a team of people) looks over the Internet to identify offerings that meet his or her needs.
It will be possible to fi nd the solution that matches our needs by simply entering our request in a
global digital market that trades Cloud-computing services. The existence of such market will enable the
automation of the discovery process and its integration into existing software systems, thus allowing users
to transparently leverage Cloud resources in their applications and systems.
The existence of a global platform for trading Cloud services will also help service providers to
become more visible, and therefore to potentially increase their revenue. A global Cloud market also
reduces the barriers between service consumers and providers: it is no longer necessary to belong to only
one of these two categories. For example, a Cloud provider might become a consumer of a competitor
service in order to fulfill its promises to customers. These are all possibilities that are introduced with the
establishment of a global Cloud computing market place and by defining an effective standard for the
unified representation of Cloud services as well as the interaction among different Cloud technologies.
A considerable shift towards Cloud computing has already been registered, and its rapid adoption
facilitates its consolidation. Moreover, by concentrating the core capabilities of Cloud computing into
large datacenters, it is possible to reduce or remove the need for any technical infrastructure on the service
consumer side. This approach provides opportunities for optimizing datacenter facilities and fully
utilizing their capabilities to serve multiple users. This consolidation model will reduce the waste of
energy and carbon emission, thus contributing to a greener IT on one end, and increase the revenue on the
other end.
2.Describe in detail about the various characteristics and benefits of cloud. (Jan ’16)
108
MC5012/ Service Oriented Architecture MCA 2019-2020
Cloud computing has some interesting characteristics that bring benefits to both Cloud Service
Consumers (CSCs) and Cloud service providers (CSPs). They are
● no upfront commitments;
● on demand access;
● nice pricing;
● simplified application acceleration and scalability;
● efficient resource allocation;
● energy efficiency; and
● seamless creation and the use of third-party services.
The most evident benefit from the use of Cloud computing systems and technologies is the
increased economical return due to the reduced maintenance costs and operational costs related to IT
software and infrastructure. This is mainly because IT assets, namely software and infrastructure, are
turned into utility costs, which are paid for as long as they are used and not upfront.
Capital costs are costs associated to assets that need to be paid in advance to start a business
activity. Before Cloud computing, IT infrastructure and software generated capital costs, since they
were paid upfront to afford a computing infrastructure enabling the business activities of an
organization. The revenue of the business is then utilized to compensate over time for these costs.
Organizations always minimize capital costs, since they are often associated to depreciable values.
This is the case of hardware: a server bought today for 1000 dollars will have a market value less than
its original price when it will be replaced by a new hardware. In order to make profit, organizations
have also to compensate this depreciation created by time, thus reducing the net gain obtained from
revenue. Minimizing capital costs is then fundamental.Cloud computing transforms IT infrastructure
and software into utilities, thus significantly contributing in increasing the net gain. Moreover, it also
provides an opportunity for small organizations and start-ups: these do not need large investments to
start their business but they can comfortably grow with it.
Finally, maintenance costs are significantly reduced: by renting the infrastructure and the
application services, organizations are not responsible anymore for their maintenance. This task is the
responsibility of the Cloud service provider, who, thanks to the economies of scale, can bear
maintenance costs.Increased agility in defining and structuring software systems is another significant
benefit. Since organizations rent IT services, they can more dynamically and flexibly compose their
software systems, without being constrained by capital costs for IT assets. There is a reduced need for
capacity planning, since Cloud computing allows to react to unplanned surges in demand quite
rapidly. For example, organizations can add more servers to process workload spikes, and dismiss
them when there is no longer need.Ease of scalability is another advantage. By leveraging the
potentially huge capacity of Cloud computing, organizations can extend their IT capability more
easily. Scalability can be leveraged across the entire computing stack. Infrastructure providers offer
simple methods to provision customized hardware and integrate it into existing systems. Platform-as-
a-Service providers offer run-time environment and programming models that are designed to scale
applications.
Software-as-a-Service offerings can be elastically sized on demand without requiring users to
provision hardware, or to program application for scalability. End users can benefit from Cloud
computing by having their data and the capability of operating on it always available, from anywhere,
at any time, and through multiple devices. Information and services stored in the Cloud are exposed
to users by Web-based interfaces that make them accessible from portable devices as well as desktops
at home. Since the processing capabilities (i.e., office automation features, photo editing, information
management, and so on) also reside in the Cloud, end users can perform the same tasks that
previously were carried out with considerable software investments. The cost for such opportunities is
generally very limited, since the Cloud service provider shares its costs across all the tenants that he is
servicing. Multi-tenancy allows for a better utilization of the shared infrastructure that is kept
operational and fully active.
109
MC5012/ Service Oriented Architecture MCA 2019-2020
The concentration of IT infrastructure and services into large datacenters also provides
opportunity for considerable optimization in terms of resource allocation and energy effi ciency,
which eventually can lead to a less impacting approach on the environment.Finally, service
orientation and on demand access create new opportunities for composing systems and applications
with a flexibility not possible before Cloud computing. New service offerings can be created by
aggregating together existing services and concentrating on added value. Since it is possible to
provision on demand any component of the computing stack, it is easier to turn ideas into products,
with limited costs and by concentrating the technical efforts on what matters: the added value.
3. Discuss in detail about the cloud reference model.
A fundamental characteristic of Cloud computing is the capability of delivering on demand a
variety of IT services, which are quite diverse from each other. This variety creates a different perception
of what Cloud computing is among users.
Despite this, it is possible to classify Cloud computing services offerings into three major
categories: Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service
(SaaS). These categories are related to each other as described in Fig.1.5, which provides an organic view
of Cloud computing. We refer to this diagram as “Cloud Computing Reference Model” to explain the
technologies and introduce the relevant research on this phenomenon. The model organizes the wide
range of Cloud computing services into a layered view that walks the computing stack from bottom to
top.
110
MC5012/ Service Oriented Architecture MCA 2019-2020
It is the responsibility of the service provider to provide scalability and to manage fault-tolerance,
while users are requested to focus on the logic of the application developed by leveraging the provider’s
APIs and libraries.
This approach increases the level of abstraction at which Cloud computing is leveraged but also
constrains the user in a more controlled environment. At the top of the stack, Software-as-a-Service
solutions provide applications and services on demand.
Most of the common functionalities of desktop applications—such as office automation,
document management, photo editing, and customer relationship management (CRM) software—are
replicated on the provider’s infrastructure, made more scalable, and accessible through a browser on
demand.
These applications are shared across multiple users, whose interaction is isolated from the other
users. The SaaS layer is also the area of social networking Websites, which leverage Cloud-based
infrastructures to sustain the load generated by their popularity.
Each layer provides a different service to users. IaaS solutions are sought by users that want to
leverage Cloud computing from building dynamically scalable computing systems requiring a specific
software stack. IaaS services are therefore used to develop scalable Web sites or for background
processing.
PaaS solutions provide scalable programming platforms for developing applications, and are
more appropriate when new systems have to be developed. IaaS solutions target mostly end users, who
want to benefit from the elastic scalability of the Cloud without doing any software development,
installation, configuration, and maintenance.
This solution is appropriate when there are existing SaaS services that fit user’s needs (i.e., email,
document management, CRM, etc.) and a minimum level of customization is needed.
4. List the types of clouds. How they are applied in problem domains. Explain What are the
various types of cloud? Explain them in detail. (Nov 2017)
Types of Cloud Computing: Private, Public and Hybrid Clouds
With cloud computing technology, large pools of resources can be connected through private or public
networks. This technology simplifies infrastructure planning and provides dynamically scalable
infrastructure for cloud based applications, data, and file storage. Businesses can choose to deploy
applications on Public, Private, Hybrid clouds or the newer Community Cloud.
What are the differences between these types of cloud computing, and how can you determine the right
cloud path for your organization? Here are some fundamentals of each to help with the decision-making
process.
Public
Public clouds are made available to the general public by a service provider who hosts the cloud
infrastructure. Generally, public cloud providers like Amazon AWS, Microsoft and Google own and
operate the infrastructure and offer access over the Internet. With this model, customers have no visibility
111
MC5012/ Service Oriented Architecture MCA 2019-2020
or control over where the infrastructure is located. It is important to note that all customers on public
clouds share the same infrastructure pool with limited configuration, security protections and availability
variances.
Public Cloud customers benefit from economies of scale, because infrastructure costs are spread across all
users, allowing each individual client to operate on a low-cost, “pay-as-you-go” model. Another
advantage of public cloud infrastructures is that they are typically larger in scale than an in-house
enterprise cloud, which provides clients with seamless, on-demand scalability. These clouds offer the
greatest level of efficiency in shared resources; however, they are also more vulnerable than private
clouds.
Private
Private cloud is cloud infrastructure dedicated to a particular organization. Private clouds allow
businesses to host applications in the cloud, while addressing concerns regarding data security and
control, which is often lacking in a public cloud environment. It is not shared with other organizations,
whether managed internally or by a third-party, and it can be hosted internally or externally.
1. On-Premise Private Cloud: This type of cloud is hosted within an organization’s own facility. A
businesses IT department would incur the capital and operational costs for the physical resources
with this model. On-Premise Private Clouds are best used for applications that require complete
control and configurability of the infrastructure and security.
2. Externally Hosted Private Cloud: Externally hosted private clouds are also exclusively used by
one organization, but are hosted by a third party specializing in cloud infrastructure. The service
provider facilitates an exclusive cloud environment with full guarantee of privacy. This format is
recommended for organizations that prefer not to use a public cloud infrastructure due to the risks
associated with the sharing of physical resources.
Undertaking a private cloud project requires a significant level and degree of engagement to virtualize the
business environment, and it will require the organization to reevaluate decisions about existing
resources. Private clouds are more expensive but also more secure when compared to public clouds. An
Info-Tech survey shows that 76% of IT decision-makers will focus exclusively on the private cloud, as
these clouds offer the greatest level of security and control.
Hybrid
Hybrid Clouds are a composition of two or more clouds (private, community or public) that remain
unique entities but are bound together offering the advantages of multiple deployment models. In a hybrid
cloud, you can leverage third party cloud providers in either a full or partial manner; increasing the
flexibility of computing. Augmenting a traditional private cloud with the resources of a public cloud can
be used to manage any unexpected surges in workload.
Hybrid cloud architecture requires both on-premise resources and off-site server based cloud
infrastructure. By spreading things out over a hybrid cloud, you keep each aspect of your business in the
most efficient environment possible. The downside is that you have to keep track of multiple cloud
security platforms and ensure that all aspects of your business can communicate with each other.
Community
A community cloud is a is a multi-tenant cloud service model that is shared among several or
organizations and that is governed, managed and secured commonly by all the participating organizations
or a third party managed service provider.
Community clouds are a hybrid form of private clouds built and operated specifically for a targeted
group. These communities have similar cloud requirements and their ultimate goal is to work together to
achieve their business objectives.
The goal of community clouds is to have participating organizations realize the benefits of a public cloud
with the added level of privacy, security, and policy compliance usually associated with a private cloud.
Community clouds can be either on-premise or off-premise.
Here are a couple of situations where a community cloud environment is best:
Government organizations within a state that need to share resources
A private HIPAA compliant cloud for a group of hospitals or clinics
112
MC5012/ Service Oriented Architecture MCA 2019-2020
5. Analyze the various types of cloud platforms available and evaluate which ones are
currently used in industries for what purpose / Discuss the cloud platforms in the industry.
(Nov 2017)
There are several different options for building enterprise cloud computing applications or for
using cloud computing technologies to integrate and extend existing industrial applications. An overview
of a few prominent cloud computing platforms and a brief description of the types of service they offer
are shown.
Development of a Cloud computing application happens by leveraging platform and frameworks
that provide different types of services, from the bare metal infrastructure to customizable applications
serving specific purposes.
1 Amazon Web Services (AWS)
AWS offers comprehensive Cloud IaaS services, ranging from virtual compute, storage, and
networking to complete computing stacks.
AWS is mostly known for its compute and storage on demand services, namely Elastic Compute
Cloud (EC2) and Simple Storage Service (S3).
EC2 provides users with customizable virtual hardware that can be used as the base infrastructure
for deploying computing systems on the Cloud.
It is possible to choose from a large variety of virtual hardware configurations including
GPU and cluster instances.
EC2 instances are deployed either by using the AWS console, which is a comprehensive Web
portal for accessing AWS services, or by using the Web services API available for several programming
languages. EC2 also provides the capability of saving a specific running instance as image, thus allowing
users to create their own templates for deploying systems. These templates are stored into S3 that delivers
persistent storage on demand. S3 is organized into buckets; these are container of objects that are stored in
binary form and can be enriched with attributes. Users can store objects of any size, from simple fi les to
entire disk images and have them accessible from everywhere. Besides EC2 and S3, a wide range of
services can be leveraged to build virtual computing systems including: networking support, caching
systems, DNS, database (relational and not) support, and others.
2 Google AppEngine
113
MC5012/ Service Oriented Architecture MCA 2019-2020
114
MC5012/ Service Oriented Architecture MCA 2019-2020
Developers can choose different abstractions to design their application: tasks, distributed
threads, and map-reduce. These applications are then executed on the distributed service-oriented runtime
environment, which can dynamically integrate additional resource on demand.
The service-oriented architecture of the runtime has a great degree of flexibility, and simplifies
the integration of new features such as abstraction of a new programming model and associated execution
management environment.
Services manage most of the activities happening at runtime: scheduling, execution, accounting,
billing, storage, and quality of service.
These platforms are key examples of technologies available for Cloud computing. These fall into
the three major market segments identified in the reference model: Infrastructure-as-a-Service, Platform-
as-a-Service, and Software-as-a-Service.
Execution Virtualization
It can be implemented directly on top of the hardware, by the operating system, an application, or
libraries dynamically or statically linked against an application image.
Machine Reference Model
It defines the interfaces between the levels of abstraction, which hide implementation details.
Virtualization techniques actually replace one of the layers and intercept the calls that are directed
towards it.
115
MC5012/ Service Oriented Architecture MCA 2019-2020
Hypervisor
Hypervisor runs above the supervisor mode.
It runs in supervisor mode.
It recreates a h/w environment
It is a piece of s/w that enables us to run one or more VMs on a physical server (host).
Two major types of hypervisor.
- Type – I
- Type - II
A relatively small software (or firmware) component that enables multiple ‘guest’ operating systems to
dynamically share the resources of an underlying ‘host’ system, by allocating resources and providing an
interface for all low-level compute requests (e.g., for CPU, memory, disk or network I/O, etc).
A hypervisor can run directly on top of bare hardware to provide a server virtualization environment, or
on top of a fully functioning operating system to provide an OS virtualization environment.
Also known as a Virtual Machine Monitor or Manager (VMM). In common usage these terms are
interchangeable, even though technically they provide different functions.
Hardware Virtualization
A method of running multiple guest operating environments directly on top of base hardware, allocating
fully discrete physical hardware resources (CPU, memory, I/O channels, etc,) separately to each guest,
without requiring a complete host operating system.
Typically used in older and larger server systems, but also recently adapted at chip-level for micro-level
x86 environments, this method uses a single enclosure to house essentially isolated compute hardware
components, which are not shared by any of the guest operating environments.
Full Virtualization
Ability to run program (OS) directly on top of a virtual machine and without any modification.
VMM require complete emulation of the entire undemeath h/w
Hypervisor has Ring 0 authority
And guest Os has Ring 1 authority
ISA of guest OS are converted into ISA of host using binary translation process.
Privileged instruction are traped.
Advantages
Complete isolation
Enhanced security
Ease of emulation of different architectures and coexistence
Paravirtualization
Not-transport virtualization
Thin VMM
Expose software interface to the virtual machine that is slightly modified from the host.
116
MC5012/ Service Oriented Architecture MCA 2019-2020
1. Increased Security
-Ability to control the execution of a guest
-Guest is executed emulated environment.
-Virtual Machine Manager control and filter the activity of the guest.
-Hiding of resources.
- Having no effect on the other users/guest environment.
2. Managed Execution types :-
a) Sharing
o Creating separate computing environment within the same host.
o Underline host is fully utilized.
b) Aggregation
o A group of separate hosts can be tied together and represented as single virtual host.
c) Emulation
o Controlling & tuning the environment exposed to guest.
117
MC5012/ Service Oriented Architecture MCA 2019-2020
d) Isolation
o Complete separate environment for guests.
e) Performance Tuning:-
o Control the performance of guest.
f) Virtual Machine Migration :-
o Move virtual image info another machine.
g) Portability:-
o Safely moved and executed on top of different virtual machine.
o Availability of system is with you.
118
MC5012/ Service Oriented Architecture MCA 2019-2020
– Since you use the Internet to connect to both your applications and documents, if you do
not have an Internet connection you cannot access anything, even your own documents.
– A dead Internet connection means no work and in areas where Internet connections are
few or inherently unreliable, this could be a deal-breaker.
• Does not work well with low-speed connections:
– Similarly, a low-speed Internet connection, such as that found with dial-up services,
makes cloud computing painful at best and often impossible.
– Web-based applications require a lot of bandwidth to download, as do large documents.
• Features might be limited:
– This situation is bound to change, but today many web-based applications simply are not
as full-featured as their desktop-based applications.
• Can be slow:
– Even with a fast connection, web-based applications can sometimes be slower than
accessing a similar software program on your desktop PC.
– Everything about the program, from the interface to the current document, has to be sent
back and forth from your computer to the computers in the cloud.
– If the cloud servers happen to be backed up at that moment, or if the Internet is having a
slow day, you would not get the instantaneous access you might expect from desktop
applications.
• Stored data might not be secure:
– With cloud computing, all your data is stored on the cloud.
• The questions is How secure is the cloud?
– Can unauthorized users gain access to your confidential data?
• Stored data can be lost:
– Theoretically, data stored in the cloud is safe, replicated across multiple machines.
– But on the off chance that your data goes missing, you have no physical or local backup.
• Put simply, relying on the cloud puts you at risk if the cloud lets you down.
• HPC Systems:
– Not clear that you can run compute-intensive HPC applications that use MPI/OpenMP!
– Scheduling is important with this type of application
• as you want all the VM to be co-located to minimize communication latency!
• General Concerns:
– Each cloud systems uses different protocols and different APIs
• may not be possible to run applications between cloud based systems
9. Discuss in detail about the virtualization and cloud computing.
Virtualization is another core technology for Cloud computing. It encompasses a collection of
solutions allowing the abstraction of some of the fundamental elements for computing such as: hardware,
runtime environments, storage, and networking.
Virtualization has been around for more than 40 years, but its application has always been limited
by technologies that did not allow an efficient use of virtualization solutions.
These limitations have been substantially overcome and virtualization has become a fundamental
element of Cloud computing. This is particularly true for solutions that provide IT infrastructure on
demand.
Virtualization confers that degree of customization and control that makes Cloud computing
appealing for users and, at the same time, sustainable for Cloud services providers.
Virtualization is essentially a technology that allows creation of different computing
environments. These environments are named as virtual, because they simulate the interface that is
expected by a guest.
The most common example of virtualization is hardware virtualization. This technology allows
simulating the hardware interface expected by an operating system. Hardware virtualization allows the
co-existence of different software stacks on top of the same hardware.
119
MC5012/ Service Oriented Architecture MCA 2019-2020
These stacks are contained inside virtual machine instances, which operate completely isolated
from each other. High-performance server can host several virtual machine instances, thus creating the
opportunity of having customized software stack on demand.
This is the base technology that enables Cloud computing solutions delivering virtual server on
demands, such as Amazon EC2, RightScale, VMware vCloud, and others.
Together with hardware virtualization, storage and network virtualization complete the range of
technologies for the emulation of IT infrastructure.
Virtualization technologies are also used to replicate runtime environments for programs. In the
case of process virtual machines, which include the foundation of technologies such as Java or .NET,
where applications instead of being executed by the operating system are run by a specific program called
virtual machine.
This technique allows isolating the execution of applications and providing a finer control on the
resource they access. Process virtual machines offer a higher level of abstraction with respect to the
hardware virtualization since the guest is only constituted by an application rather than a complete
software stack.
This approach is used in Cloud computing in order to provide a platform for scaling applications
on demand, such as Google AppEngine and Windows Azure.
Having isolated and customizable environments with minor impact on performance is what
makes virtualization an attractive technology. Cloud computing is realized through platforms that
leverage the basic concepts described above and provides on-demand virtualization services to a
multitude of users across the globe.
120
MC5012/ Service Oriented Architecture MCA 2019-2020
Software as a Service
Software that is deployed over the internet... With SaaS, a provider licenses an application to customers
either as a service on demand, through a subscription, in a “pay-as-you-go” model, or (increasingly) at no
charge when there is opportunity to generate revenue from streams other than the user, such as from
advertisement or user list sales .
SaaS is a rapidly growing market as indicated in recent reports that predict ongoing double digit growth
[9]. This rapid growth indicates that SaaS will soon become commonplace within every organization and
hence it is important that buyers and users of technology understand what SaaS is and where it is suitable.
Characteristics of SaaS
Like other forms of Cloud Computing, it is important to ensure that solutions sold as SaaS in fact comply
with generally accepted definitions of Cloud Computing. Some defining characteristics of SaaS include;
• Web access to commercial software
• Software is managed from a central location
• Software delivered in a “one to many” model
• Users not required to handle software upgrades and patches
• Application Programming Interfaces (APIs) allow for integration between different pieces of software
Infrastructure As a Service
It is a way of delivering Cloud Computing infrastructure – servers, storage, network and operating
systems – as an on-demand service. Rather than purchasing servers, software, datacenter space or network
equipment, clients instead buy those resources as a fully outsourced service on demand.
Generally IaaS can be obtained as public or private infrastructure or a combination of the two. “Public
cloud” is considered infrastructure that consists of shared resources, deployed on a self-service basis over
the Internet.
By contrast, “private cloud” is infrastructure that emulates some of Cloud Computing features, like
virtualization, but does so on a private network. Additionally, some hosting providers are beginning to
offer a combination of traditional dedicated hosting alongside public and/ or private cloud networks. This
combination approach is generally called “Hybrid Cloud”.
Characteristics of IaaS
SaaS and PaaS, IaaS is a rapidly developing field. That said there are some core characteristics which
describe what IaaS is. IaaS is generally accepted to comply with the following;
• Resources are distributed as a service
• Allows for dynamic scaling
• Has a variable cost, utility pricing model
• Generally includes multiple users on a single piece of hardware
121
MC5012/ Service Oriented Architecture MCA 2019-2020
Platform As a Service
Platform as a Service (PaaS) brings the benefits that SaaS bought for applications, but over to the
software development world. PaaS can be defined as a computing platform that allows the creation of
web applications quickly and easily and without the complexity of buying and maintaining the software
and infrastructure underneath it.
PaaS is analogous to SaaS except that, rather than being software delivered over the web, it is a platform
for the creation of software, delivered over the web.
Characteristics of PaaS
There are a number of different takes on what constitutes PaaS but some basic characteristics
• Services to develop, test, deploy, host and maintain applications in the same integrated development
environment. All the varying services needed to fulfil the application development process
• Web based user interface creation tools help to create, modify, test and deploy different UI scenarios
• Multi-tenant architecture where multiple concurrent users utilize the same development application
• Built in scalability of deployed software including load balancing and failover
• Integration with web services and databases via common standards
• Support for development team collaboration – some PaaS solutions include project planning and
communication tools
• Tools to handle billing and subscription management
122
MC5012/ Service Oriented Architecture MCA 2019-2020
Back End
On the other hand, back end is the “cloud” part of a cloud computing architecture, comprising all the
resources required to deliver cloud-computing services. A system’s back end can be made up of a number
of bare metal servers, data storage facilities, virtual machines, a security mechanism, and services, all
built in conformance with a deployment model, and all together responsible for providing a service.
1. It is the primary authority and responsibility of the back end to provide a built-in security
mechanism, traffic control, and protocols.
2. The operating system on a bare metal server – known popularly as hypervisor – makes use of
well-defined protocols allowing multiple guest virtual machines to run concurrently. The
hypervisor guides communication between its containers and the connected world beyond.
A central server is responsible for managing and running the system, systematically reviewing the traffic
and client requests to make certain that everything is running smoothly. Hypervisors come in various
flavors:
1. Native hypervisors: They are run directly on a bare metal server without an intermediary
operating system and thus carry full responsibility for performance and reliability.
2. Embedded hypervisors: They are assimilated into a processor on a separate chip, improving
server performance.
3. Hosted hypervisors: These run as a distinct software layer above both the hardware and the OS,
This sort of hypervisor is beneficial for both private and public clouds to achieve performance
improvements.
The server virtualization methodology used by hypervisors bypasses some of the physical limitations that
stand-alone servers can face. Virtualization allows software to trick a physical server into thinking it is in
fact part of a multiple server environment, and therefore capable of drawing on extra, otherwise
underutilized, capacity.
As the numbers of services hosted by a cloud computing provider grow, the demands of higher traffic and
compute loads that obviously grow with it must be anticipated and accommodated. But exponentially
growing demands for storage space can’t be ignored.
To properly maintain and protect a client’s data, a cloud computing architecture requires greater
redundancy than might be needed for locally hosted systems. The copies generated by this necessary
redundancy allow the central server to jump in and access backup images to quickly retrieve and restore
needed data.
11. Explain the architecture of cloud computing with a neat diagram / Explain the
architecture of cloud computing and highlight the benefits using cloud computing. (Nov
2016) / (Nov 2017)
A fundamental characteristic of Cloud computing is the capability of delivering on demand a
variety of IT services, which are quite diverse from each other. This variety creates a different perception
of what Cloud computing is among users.
Despite this, it is possible to classify Cloud computing services offerings into three major
categories: Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS), and Software-as-a-Service
(SaaS). These categories are related to each other as described in Fig.1.5, which provides an organic view
of Cloud computing. We refer to this diagram as “Cloud Computing Reference Model” to explain the
technologies and introduce the relevant research on this phenomenon. The model organizes the wide
range of Cloud computing services into a layered view that walks the computing stack from bottom to
top.
123
MC5012/ Service Oriented Architecture MCA 2019-2020
Benefits
Cloud computing has some interesting characteristics that bring benefits to both Cloud Service
Consumers (CSCs) and Cloud service providers (CSPs). They are
● no upfront commitments;
● on demand access;
124
MC5012/ Service Oriented Architecture MCA 2019-2020
● nice pricing;
● simplified application acceleration and scalability;
● efficient resource allocation;
● energy efficiency; and
● seamless creation and the use of third-party services.
The most evident benefit from the use of Cloud computing systems and technologies is the
increased economical return due to the reduced maintenance costs and operational costs related to IT
software and infrastructure. This is mainly because IT assets, namely software and infrastructure, are
turned into utility costs, which are paid for as long as they are used and not upfront.
Capital costs are costs associated to assets that need to be paid in advance to start a business
activity. Before Cloud computing, IT infrastructure and software generated capital costs, since they
were paid upfront to afford a computing infrastructure enabling the business activities of an
organization. The revenue of the business is then utilized to compensate over time for these costs.
Organizations always minimize capital costs, since they are often associated to depreciable values.
This is the case of hardware: a server bought today for 1000 dollars will have a market value less than
its original price when it will be replaced by a new hardware. In order to make profit, organizations
have also to compensate this depreciation created by time, thus reducing the net gain obtained from
revenue. Minimizing capital costs is then fundamental. Cloud computing transforms IT infrastructure
and software into utilities, thus significantly contributing in increasing the net gain. Moreover, it also
provides an opportunity for small organizations and start-ups: these do not need large investments to
start their business but they can comfortably grow with it.
Finally, maintenance costs are significantly reduced: by renting the infrastructure and the
application services, organizations are not responsible anymore for their maintenance. This task is the
responsibility of the Cloud service provider, who, thanks to the economies of scale, can bear
maintenance costs.
Increased agility in defining and structuring software systems is another significant benefit. Since
organizations rent IT services, they can more dynamically and flexibly compose their software
systems, without being constrained by capital costs for IT assets. There is a reduced need for capacity
planning, since Cloud computing allows to react to unplanned surges in demand quite rapidly. For
example, organizations can add more servers to process workload spikes, and dismiss them when
there is no longer need. Ease of scalability is another advantage. By leveraging the potentially huge
capacity of Cloud computing, organizations can extend their IT capability more easily. Scalability can
be leveraged across the entire computing stack. Infrastructure providers offer simple methods to
provision customized hardware and integrate it into existing systems. Platform-as-a-Service providers
offer run-time environment and programming models that are designed to scale applications.
125
MC5012/ Service Oriented Architecture MCA 2019-2020
The concentration of IT infrastructure and services into large datacenters also provides opportunity for
considerable optimization in terms of resource allocation and energy efficiency, which eventually can lead
to a less impacting approach on the environment. Finally, service orientation and on demand access create
new opportunities for composing systems and applications with a flexibility not possible before Cloud
computing. New service offerings can be created by aggregating together existing services and
concentrating on added value. Since it is possible to provision on demand any component of the
computing stack, it is easier to turn ideas into products, with limited costs and by concentrating the
technical efforts on what matters: the added value
12. With a neat diagram, explain the architecture of hybrid cloud. (Nov 2016)
Hybrid
Hybrid Clouds are a composition of two or more clouds (private, community or public) that remain
unique entities but are bound together offering the advantages of multiple deployment models. In a hybrid
cloud, you can leverage third party cloud providers in either a full or partial manner; increasing the
flexibility of computing. Augmenting a traditional private cloud with the resources of a public cloud can
be used to manage any unexpected surges in workload.
Hybrid cloud architecture requires both on-premise resources and off-site server based cloud
infrastructure. By spreading things out over a hybrid cloud, you keep each aspect of your business in the
most efficient environment possible. The downside is that you have to keep track of multiple cloud
security platforms and ensure that all aspects of your business can communicate with each other. For
many enterprises, hybrid can be the best cloud option. But there are a lot of things to consider and a lot of
questions to ask any vendor that is selling you on a hybrid cloud offering.
A hybrid cloud is typically offered in one of two ways: a vendor has a private cloud and forms a
partnership with a public cloud provider, or a public cloud provider forms a partnership with a vendor that
provides private cloud platforms. There are exceptions -- Terremark has a private cloud and a hybrid
cloud. But generally, these vendors likely have different cloud APIs and different management, which
results in integration issues that must be overcome to create a finely tuned hybrid cloud environment.
Cloud vendors almost always stress how easy it is to move to their hybrid environments; be careful.
Before signing up to implement a hybrid cloud, talk to the people (primarily the public cloud folk) who
are involved in providing your new cloud option. Shake their hands, find out who they are, what their
qualifications and skill sets are and how they are organized with respect to problem resolutions. When an
application goes down in the middle of the night, find out who to contact. And don’t forget to ask
important questions about performance and latency.
Moving to a hybrid cloud environment -- even if you have already been using public clouds and/or private
clouds -- is a big step. While you've been warned about being locked in to your private cloud vendor
before, being locked into a hybrid cloud is almost a certainty. This is because of the total lack of open
standards around cloud computing beyond OVF.
Unraveling yourself from one hybrid environment and moving to another is not something that you will
want to undertake. Before you accept the claims made by hybrid cloud vendors, ensure that their offering
will satisfy your requirements by talking to their reference customers.
If you have a private cloud and want to move to a hybrid cloud environment, there are some good
alternatives for you to consider: Find a vendor such as CloudSwitch that can abstract platforms,
hypervisors, and APIs out of the picture. Find a public cloud provider that supports your private cloud
API so that migrating virtual images back and forth is easier than if the APIs differ.
126
MC5012/ Service Oriented Architecture MCA 2019-2020
Find a cloud vendor such as VMware that has the same cloud stack and cloud API for both the private
cloud and public cloud. Find a third party that has software that can be tailored to migrate virtual images
between your private cloud and the public cloud. The lack of cloud interoperability is a big hybrid cloud
issue. Look toward cloud vendors that have both large numbers of partners and cloud APIs that might be
candidates for ratification as open standards for clouds. Several private clouds support the Amazon EC2
API, and VMware uses its vCloud API in both its private and public clouds
127