0% found this document useful (0 votes)
106 views55 pages

It 6801 Soa QB

The document provides an introduction to XML including defining XML, differences between XML and HTML, writing a simple XML document code snippet, building blocks of XML document structure, XML declaration and its components, document type declaration and its components, elements and attributes in XML with examples, entity reference with an example, rules of XML structure, defining well formed and valid documents, namespaces in XML, defining DTD and its syntax, DTD element rules, DTD attribute types, predefined XML entities, DTD drawbacks, and defining XSD.

Uploaded by

Sankar Jaikissan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views55 pages

It 6801 Soa QB

The document provides an introduction to XML including defining XML, differences between XML and HTML, writing a simple XML document code snippet, building blocks of XML document structure, XML declaration and its components, document type declaration and its components, elements and attributes in XML with examples, entity reference with an example, rules of XML structure, defining well formed and valid documents, namespaces in XML, defining DTD and its syntax, DTD element rules, DTD attribute types, predefined XML entities, DTD drawbacks, and defining XSD.

Uploaded by

Sankar Jaikissan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 55

IT6801 SERVICE ORIENTED ARCHITECTURE

UNIT - 1

INTRODUCTION TO XML

SYLLABUS: XML document structure – Well formed and valid documents – Namespaces –
DTD – XML Schema – X-Files.

PART A

2 MARK QUESTIONS

1. What is XML?

 XML stands for eXtensible Markup Language


 XML is a markup language much like HTML
 XML was designed to store and transport data
 XML was designed to be self-descriptive
 XML is a W3C Recommendation

2. Difference between XML and HTML?

HTML XML
HTML is an abbreviation for Hyper Text XML stands for eXtensible Markup
Markup Language. Language.
HTML was designed to display data with XML was designed to be a software and
focus on how data looks. hardware independent tool used to transport
and store data, with focus on what data is.
HTML is a markup language itself. XML provides a framework for defining
markup languages.
HTML is a presentation language. XML is neither a programming language nor
a presentation language.
HTML is case insensitive. XML is case sensitive.
HTML is used for designing a web-page to XML is used basically to transport data
be rendered on the client side. between the application and the database.
HTML has it own predefined tags. While what makes XML flexible is that
custom tags can be defined and the tags are
1
invented by the author of the XML
document.
HTML is not strict if the user does not use XML makes it mandatory for the user the
the closing tags. close each tag that has been used.
HTML does not preserve white space. XML preserves white space.
HTML is about displaying data, hence static. XML is about carrying information, hence
dynamic.

3. Write a code snippet for simple XML document?

 The syntax rules of XML are very simple and logical. The rules are easy to learn, and
easy to use.
 XML documents must contain one root element that is the parent of all other
elements:
<root>

<child>

<subchild>.....</subchild>

</child>

</root>

 In this example <note> is the root element:


<?xml version="1.0" encoding="UTF-8"?>

<note>

<to>Tove</to>

<from>Jani</from>

<heading>Reminder</heading>

<body>Don't forget me this weekend!</body>

</note>

 To avoid errors, you should specify the encoding used, or save your XML files as
UTF-8.

4. Mention the building blocks of XML document structure.

2
 Elements
o Elements are the main building blocks of both XML and HTML documents.
o Examples of HTML elements are "body" and "table".
<body>some text</body>
<message>some text</message>
 Attributes
o Attributes provide extra information about elements.
o Attributes are always placed inside the opening tag of an element. Attributes
always come in name/value pairs. The following "img" element has additional
information about a source file:
<img src="computer.gif" />
 Entities
o Some characters have a special meaning in XML, like the less than sign (<)
that defines the start of an XML tag.
o Most of you know the HTML entity: "&nbsp;". This "no-breaking-space"
entity is used in HTML to insert an extra space in a document. Entities are
expanded when a document is parsed by an XML parser.
 PCDATA
o PCDATA means parsed character data.
o PCDATA is text that WILL be parsed by a parser. The text will be examined
by the parser for entities and markup.
 CDATA
o CDATA means character data.
o CDATA is text that will NOT be parsed by a parser. Tags inside the text will
NOT be treated as markup and entities will not be expanded.

5. Define Xml Declaration and mention its component.

3
6. Define Document type declaration and mention its components.

4
7. What is element and attributes in xml? Explain with example.

5
6
8. What is Entity reference? Explain with example?

7
9. List out the rules of xml structure.

8
10. What is well formed and valid document?

9
10
11
11. What is namespace in xml?

12. What is DTD and write the syntax for it?

12
13. Mention the DTD element rules.

 XML elements can be defined as building blocks of an XML document. Elements can
behave as a container to hold text, elements, attributes, media objects or mix of all.
 A DTD element is declared with an ELEMENT declaration. When an XML file is
validated by DTD, parser initially checks for the root element and then the child
elements are validated.
 All DTD element declarations have this general form:
 <!ELEMENT elementname (content)>
o ELEMENT declaration is used to indicate the parser that you are about to
define an element.
o elementname is the element name (also called the generic identifier) that you
are defining.
o content defines what content (if any) can go within the element.

14. List out the DTD attributes types.

 Basic syntax of DTD attributes declaration is as follows:


 <!ATTLIST element-name attribute-name attribute-type attribute-value>

13
 In the above syntax
o The DTD attributes start with <!ATTLIST keyword if the element contains the
attribute.
o element-name specifies the name of the element to which the attribute applies.
o attribute-name specifies the name of the attribute which is included with the
element-name.
o attribute-type defines the type of attributes. We will discuss more on this in the
following sections.
o attribute-value takes a fixed value that the attributes must define. We will
discuss more on this in the following sections.
 When declaring attributes, you can specify how the processor should handle the data
that appears in the value. We can categorize attribute types in three main categories:
o String type
o Tokenized types
o Enumerated types
 Following table provides a summary of the different attribute types:

14
15
15. Mention the XML predefined entities.

 Entities are used to define shortcuts to special characters.


 Entities can be declared internal or external.
 An Internal Entity Declaration
 Syntax
<!ENTITY entity-name "entity-value">
 Example
<!ENTITY writer "Donald Duck.">
<!ENTITY copyright "Copyright W3Schools.">
 XML example:
<author>&writer;&copyright;</author>
 Note: An entity has three parts: an ampersand (&), an entity name, and semicolon (;).
 An External Entity Declaration
 Syntax
<!ENTITY entity-name SYSTEM "URI/URL">
 Example
<!ENTITY writer SYSTEM "http://www.w3schools.com/entities.dtd">
<!ENTITY copyright SYSTEM "http://www.w3schools.com/entities.dtd">
 XML example:
<author>&writer;&copyright;</author>

16. Write the DTD drawbacks.

 It does not support the namespaces. Namespace is a mechanism by which element and
attribute names can be assigned to groups. However, in a DTD namespaces have to be
defined within the DTD, which violates the purpose of using namespaces.
 It supports only the text string data type.
 It is not object oriented. Hence, the concept of inheritance cannot be applied on the
DTDs.
 Limited possibilities to express the cardinality for elements.

17. What is XSD?

16
 An XML Schema describes the structure of an XML document.
 The XML Schema language is also referred to as XML Schema Definition (XSD).
 XSD 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>
 The purpose of an XML Schema is to define the legal building blocks of an XML
document:
o the elements and attributes that can appear in a document
o the number of (and order of) child elements
o data types for elements and attributes
o default and fixed values for elements and attributes

18. What is XPATH and mention its syntax?

17
19. List out the xpath axes for location step

 A location path can be absolute or relative.


 An absolute location path starts with a slash ( / ) and a relative location path does not.
In both cases the location path consists of one or more steps, each separated by a
slash:
An absolute location path:
/step/step/...
A relative location path:
step/step/...
 Each step is evaluated against the nodes in the current node-set.
 A step consists of:
o an axis (defines the tree-relationship between the selected nodes and the
current node)
o a node-test (identifies a node within an axis)
o zero or more predicates (to further refine the selected node-set)
o The syntax for a location step is:
axisname::nodetest[predicate]

20. What is xlink?

18
PART - B

1. Explain in detail about XML document Structure?

2. Explain in detail about DTD?

3. Explain in detail about XML schema?

4. Explain in detail about XFILES?

19
UNIT - 2

BUILDING XML- BASED APPLICATIONS

SYLLABUS: Parsing XML – using DOM, SAX – XML Transformation and XSL – XSL
Formatting – Modeling Databases in XML.

COURSE OBJECTIVE: Be exposed to build applications based on XML.

PART A

2 MARK QUESTIONS

1. What is DOM?

 The DOM defines a standard for accessing and manipulating documents:


 "The W3C Document Object Model (DOM) is a platform and language-neutral
interface that allows programs and scripts to dynamically access and update the
content, structure, and style of a document."
 The HTML DOM defines a standard way for accessing and manipulating HTML
documents. It presents an HTML document as a tree-structure.
 The XML DOM defines a standard way for accessing and manipulating XML
documents. It presents an XML document as a tree-structure.
 Understanding the DOM is a must for anyone working with HTML or XML.

2. Mention the need of DOM.

20
3. Write the steps in parsing XML document using DOM.

 DOM is not a set of data structures; rather it is an object model describing XML
documents.
 DOM does not specify what information in a document is relevant or how information
should be structured.
 DOM has nothing to do with COM, CORBA, or other technologies that include the
words object model.

4. Mention about DOM Levels.

• The DOM working group works on phases (or levels) of the specification. At the time
of this writing, three levels are in the works.
• The DOM Level 1 and Level 2 specifications are W3C recommendations. This means
that the specifications are final and can be implemented without fear of things
changing.
• Level 1 allows traversal of an XML document as well as the manipulation of the
content in that document.
• Level 2 extends Level 1 with additional features such as namespace support, events,
ranges, and so on.
• Level 3 is currently a working draft. This means that it is under active development
and subject to change.

21
• Details of the developments can be found at the DOM working group Website
(www.w3.org/DOM).

5. What is Core DOM?

The DOM core is available in DOM Level 1 and beyond. It permits you to create and
manipulate XML documents in memory. As mentioned earlier, DOM is a tree structure that
represents elements, attributes, and content. As an example, let’s consider a simple XML
document, as shown in Listing 7.1.

LISTING 7.1 Simple XML Document

<purchase-order>

<customer>James Bond</customer>

<merchant>Spies R Us</merchant>

<items>

<item>Night vision camera</item>

<item>Vibrating massager</item>

</items>

</purchase-order>

6. What is Range? List out the range Interfaces.

A range consists of two boundary points corresponding to the start and the end of the range.
A boundary point’s position in a Document or DocumentFragment tree can be characterized
by a node and an offset. The node is the container of the boundary point and its position. The
container and its ancestors are the ancestor containers of the boundary point and its position.
The offset within the node is the offset of the boundary point and its position. If the container
is an Attr, Document, DocumentFragment, Element, or EntityReference node, the offset is
between its child nodes. If the container is a CharacterData, Comment, or
ProcessingInstruction node, the offset is between the 16-bit units of the UTF-16 encoded
string contained by it.

22
7. Write the disadvantages of DOM?

• Although DOM is a W3C specification with support for a variety of programming


languages, it’s not necessarily the best solution for all problems. One of the big issues
is that DOM can be memory intensive.
• As mentioned earlier, when an XML document is loaded, the entire document is read
in at once. A large document will require a large amount of memory to represent it.
Other parsing methods, such as SAX, don’t read in the entire document, so they are
better in terms of memory efficiency for some applications.
• Some have argued that the DOM API is too complex. Although this is somewhat
subjective, it is true that DOM is not practical for small devices such as PDAs and
cellular phones. With the rapid proliferation of these devices and demand for greater
functionality, XML will very likely play a role in this market. In these cases, DOM as
specified by the W3C might not be the best way to go. Fortunately, there are smaller,
simpler APIs for XML manipulation that follow the spirit, if not the letter, of DOM.
Some of these alternative APIs are discussed later in this chapter.
• Of course, everything is relative. If you want to write a quick-and-dirty program
without the need for a lot of functionality, you might not require a sophisticated API
at all. If all you want to do is generate a relatively simple XML document, you can
always write out XML directly and avoid DOM entirely. However, as any veteran
programmer knows, that quick-and-dirty code you wrote the midnight before the
demo somehow always finds its way into production and becomes a maintenance
nightmare.

8. Difference between DOM and SAX?

23
9. What is SAX?

SAX is an API that can be used to parse XML documents. A parser is a program that reads
data a character at a time and returns manageable pieces of data. For example, a parser for the
English language might break up a document into paragraphs, words, and punctuation. In the
case of XML, the important pieces of data include elements, attributes, text, and so on. This
is what SAX does.

SAX provides a framework for defining event listeners, or handlers. These handlers are
written by developers interested in parsing documents with a known structure. The handlers
are registered with the SAX framework in order to receive events. Events can include start of
document, start of element, end of element, and so on. The handlers contain a number of
methods that will be called in response to these events. Once the handlers are defined and
registered, an input source can be specified and parsing can begin.

10. Write the disadvantages of SAX.

24
• SAX is not a perfect solution for all problems. For instance, it can be a bit harder to
visualize compared to DOM because it is an event-driven model. SAX parsing is
“single pass,” so you can’t back up to an earlier part of the document any more than
you can back up from a serial data stream.
• Moreover, you have no random access at all. Handling parent/child relationships can
be more challenging as well.
• Another disadvantage is that the current SAX implementations are read-only parsers.
• They do not provide the ability to manipulate a document or its structure (this feature
may be added in the future). DOM is the way to go if you want to manipulate a
document in memory. There is no formal specification for SAX. The interfaces and
behavior are defined through existing code bases. This means there is no way to
validate a SAX parser or to determine whether it works correctly.
• Even considering these limitations, SAX does its job well. It’s lightweight, simple,
and easy to use. If all you want to do is read XML, SAX will probably do what you
need.

11. What is XSLT?

25
12. What is JAXB?

13. How XSLT works?

In the transformation process, XSLT uses XPATH to define parts of the source document that
should match one or more predefined templates. When the match is found XSLT will
transform the matching part of the source document into the result document.

14. Write the steps in creating JAXB solution.

1. Review the database schema.

2. Construct the desired XML document.

3. Define a schema for the XML document.

4. Create the JAXB binding schema.

5. Generate the JAXB classes based on the schema.

6. Develop a Data Access Object (DAO).

7. Develop a servlet for HTTP access.

15. What is schema?

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.

26
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

</xs:schema>

PART - B

16 MARK QUESTIONS

1. Explain in detail about parsing XML using DOM.

2. Explain in detail about parsing XML using SAX.

3. Explain in detail about XSLT.

4. What is XSL-FO? Explain in detail.

5. What are steps in modeling database in XML? Explain each step in detail.

27
UNIT - 3

SERVICE ORIENTED ARCHITECTURE

SYLLABUS: Characteristics of SOA, Comparing SOA with Client – Server and Distributed
architectures – Benefits of SOA -- Principles of Service orientation – Service layers.

PART A

2 MARK QUESTIONS

1. What is Service Oriented Architecture?

Service oriented architecture is essentially a collection of services. These services


communicate with each other. The communication can involve either simple data passing or
it could involve two or more services coordinating some activity.

2. Define Contemporary SOA.

Contemporary SOA represents an architecture that promotes service orientation through the
use of web services. Contemporary SOA represents an open, agile, extensible, federated,
composable architecture comprised of autonomous, QoS-capable, vendor diverse,
interoperable, discoverable, and potentially reusable services, implemented as Web services.

3. List out some characteristics of Contemporary SOA.

Some of the characteristics of contemporary SOA are:-

i. Contemporary SOA is at the core of the service oriented platform.

ii. Contemporary SOA increases quality of service.

iii. Contemporary SOA is fundamentally autonomous.

iv. Contemporary SOA is based on open standards.

v. Contemporary SOA supports vendor diversity.

28
vi. Contemporary SOA fosters intrinsic interoperability.

vii. Contemporary SOA promotes discovery.

viii. Contemporary SOA promotes federation.

ix. Contemporary SOA promotes architectural composability.

x. Contemporary SOA fosters inherent reusability.

4. What are the benefits of SOA?

The benefits of SOA are:

i. Improved integration and intrinsic interoperability

ii. Inherent reuse

iii. Streamlined architectures and solutions

iv. Leveraging the legacy investment

v. Establishing standardized XML data representation

vi. Focused investment on communications infrastructure

vii. “Best-of-breed” alternatives

viii. Organizational agility

5. What are the common pitfalls of adopting SOA?

The common pitfalls of adopting SOA are:

i. Building service oriented architectures like traditional distributed architectures

ii. Not standardizing SOA

iii. Not creating a transition plan

iv. Not starting with an XML foundation architecture

v. Not understanding SOA performance requirements

vi. Not understanding web services security

vii. Not keeping in touch with product platforms and standards development

29
6. What are the requirements is needed to fill QoS gaps between contemporary and
Primitive SOA?

Contemporary SOA is striving to fill the QoS gaps of the primitive SOA model with the
following requirements:

i. Security (contents and access)

ii. Reliability (message guaranteed delivery)

iii. Appropriate performance

iv. Protecting business integrity

v. Executing exception logic in case of failure

7. What is Autonomous Principle?

Autonomous Principle represents the ability of a service to carry out its logic independently
of outside influences.

8. List out the different levels of Autonomy.

Different levels of Autonomy are:

i. Runtime autonomy

ii. Design time autonomy

9. What is Runtime Autonomy?

Runtime Autonomy represents the amount of control a service has over its execution
environment at runtime.

10. What is Design time autonomy?

Design time autonomy represents the amount of governance control a service owner has over
the service design.

11. Expand UDDI.

UDDI stands for Universal Description Discovery and Integration.

30
12. What are the design characteristics required to facilitate interoperability in
contemporary SOA?

The design characteristics required to facilitate interoperability are:

i. Standardization

ii. Scalability

iii. Behavioral predictability

iv. Reliability

13. How is loose coupling concept achieved in SOA?

The loose coupling concept is achieved by implementing standardized service abstraction


layers when service orientation principles are applied to both business modeling and technical
design.

14. What is referred as Organizational Agility?

Organizational Agility refers to efficiency with which an organization can respond to change.

15. What is Architecture?

Architecture refers a systematic arrangement of computerized automation technological


solutions.

16. What is application architecture?

Application architecture is a template for all others which specifically explained the
technology, boundaries, rules, limitations, and design characteristics that apply to all
solutions based on this template.

17. What is enterprise architecture?

Enterprise architecture is a creation of master specification when numerous, disparate and


integrate application architectures exist within an organization.

18. What is Single-tier client-server architecture?

31
Single-tier client-server architecture is an environment in which bulky mainframe back-ends
server served the thin clients.

19. List out the primary characteristics of the two tier client server architecture?

The primary characteristics of the two tier client server architectures is given below which is
compared to SOA

i. Application logic

ii. Application processing

iii. Technology

iv. Security

v. Administration

20. What is multi-tier client-server architectures?

Multi-tier architecture (often referred to as n-tier architecture) is a client-server architecture in


which the presentation, the application processing, and the data management are logically
separate processes.

21. List out the types of communications of mainframe systems?

The different types of communications of mainframe systems are:

i. Synchronous communication

ii. Asynchronous communication

22. Define synchronous communication.

Synchronous communication allows the client and server to wait for each other to transfer the
message. That is, the client will not continue until the server has received the message.

23. Define asynchronous communication.

Asynchronous communication allows the server to continuously receive messages from the
client without waiting for the server to respond.

32
24. List out the types of service autonomy?

The different types of service autonomy are:

i. Service-level autonomy

ii. Pure autonomy

• Service-level autonomy - Service boundaries are distinct from each other, but the service
may share underlying resources. For example, a wrapper service that encapsulates a legacy
environment that also is used independently from the service has service-level autonomy. It
governs the legacy system but also shares resources with other legacy clients.

• Pure autonomy - The underlying logic is under complete control and ownership of the
service. This is typically the case when the underlying logic is built from the ground up in
support of the service.

25. What are the key benefits of service reuse?

The key benefits of service reuse are:

i. Accommodate future requirements with less development effort

ii. Reduce the need for creating wrapper services

iii. Reduction of cost by not just avoiding duplication of code

iv. Reducing risks by reusing well-tested code and runtime environments

26. State Separation of concerns.

“Separation of concerns” is an established software engineering theory based on the idea of


breaking down a large problem into a series of individual concerns.

27. What are the parts of automation logic?

The four identified parts of automation logic related to different sized units of logic as
follows:

i. messages = units of communication

ii. operations = units of work

iii. services = units of processing logic (collections of units of work)

33
iv. processes = units of automation logic (coordinated aggregation units of work)

28. What are the issues that are raised in the client-server and the distributed Internet
architecture?

The issues that are raised in the client-server and the distributed Internet architecture
comparisons are discussed in a comparison between multi-tier client-server and SOA.

i. Application logic

ii. Application processing

iii. Technology

iv. Security

v. Administration

29. What is the use of RPC?

Client-server remote procedure call (RPC) connection is used for remote communication
between components residing on client workstations and servers.

30. Write down the advantage of RPC?

Advantages of RPC are:

i. Better load balancing: More evenly distributed processing (e.g., application logic
distributed between several servers)

ii. More scalable: Only servers experiencing high demand need be upgraded

iii. Multiple concurrent requests are processed

31. Write down the disadvantages of RPC?

Disadvantages of RPC are:

In heavily loaded network

i. More distributed processing necessitates more data exchanges

ii. Difficult to program and test due to increased complexity

34
32. What is the difference between services and components?

Services are logical grouping of components to achieve business functionality. Components


are implementation approaches to make a service.

33. Define supplementary definition of SOA?

Supplementary definition that can be applied to both primitive and contemporary SOA. SOA
is a form of technology architecture that adheres to the principles of serviceorientation. When
realized through the Web services technology platform, SOA establishes the potential to
support and promote these principles throughout the business process and automation
domains of an enterprise.

34. Write down the layers of abstraction identified for SOA.

The three layers of abstraction identified for SOA are:

i. the application service layer

ii. the business service layer

iii. the orchestration service layer

35. List some of the characteristics of Application Service layer.

i. Expose functionality within a specific processing context

ii. Draw upon available resources within a given platform

iii. Solution – agnostic

iv. Generic and reusable

v. Achieve point-to-point integration with other application services

vi. Inconsistent in terms of the interface granularity they expose

vii. Mixture of custom-developed and third-party purchased services

PART - B

16 MARK QUESTIONS

1. Explain briefly about Characteristics of SOA

35
2. Explain briefly about principles of SOA

3. Explain briefly about Client / Server architecture

4. Explain briefly about Distributed Internet architecture

5. Explain in detail about the 3 layers of abstraction

UNIT - 4

36
WEB SERVICES

SYLLABUS: Service descriptions – WSDL – Messaging with SOAP – Service discovery –


UDDI – Message Exchange Patterns – Orchestration – Choreography –WS Transactions.

PART A

2 MARK QUESTIONS

1. What is Web Services?

A web service is used to implement architecture according to service oriented architecture


(SOA) concepts. The basic unit of communication is message.

2. What are the basic parts comprised in the web services framework?

The basic parts comprised in the web services framework are:

i. one or more architectures

ii. technologies

iii. concepts

iv. models

v. sub-frameworks

3. List out the characteristics of web services framework.

The various characteristics of web services framework are:

i. An abstract (vendor-neutral) existence defined by standards organizations and


implemented by (proprietary) technology platforms.

ii. Core building blocks that include web services, service descriptions, and messages.

iii. A communication agreement centered around service descriptions based on


WSDL.

iv. A messaging framework comprised of SOAP technology and concepts.

37
v. A service description registration and discovery architecture sometimes realized
through UDDI.

vi. A well-defined architecture that supports messaging patterns and compositions.

vii. A second generation of web services extensions (also known as the WS-
*specifications) continually broadening its underlying feature-set.

4. Write down the advantage of web services.

The various advantages of web services are:

i. Flexible

ii. Adaptable

iii. Promotes interoperability

iv. Reduces complexity by encapsulation

v. Enables just-in-time integration

5. Give the classification of web services design.

The different classification of web services design is:

i. Temporary classification (service roles)

ii. Permanent classification (service models)

6. Define Service.

A service is a unit of software capable of altering its role, depending on its processing
responsibility in a given scenario.

7. What are the fundamentals in role of service?

The different fundamental in role of services are:

i. Service provider

ii. Service consumer

iii. Intermediaries

38
iv. Initial sender and ultimate receiver

v. Service compositions

8. What is the service provider?

The service provider is used to identify the organization (or individual) responsible for
actually providing the web service. It simply referred as the service being invoked.

9. What is service requestor?

Service requestor is a processing logic unit capable of issuing a request message that can be
understood by the service provider.

10. What are referred to as intermediaries?

Web services and service agents route and process a message after it is initially sent and
before it arrives at its ultimate destination are referred to as intermediaries or intermediary
services.

11. Give the types of intermediaries.

The different types of intermediaries are:

i. Passive intermediary

ii. Active intermediary

12. What is initial sender?

Initial senders are simply service requestors that initiate the transmission of message. It is the
first web service in a message path.

13. What is ultimate receiver?

Ultimate receiver identifies service consumer that exist as the last web service along a
messages’ path.

39
14. What is service composition?

A service composition is a coordinated aggregate of services each is assigned with service


composition number to complete a given task. Service compositions also are referred to as
service assemblies.

15. What is referred as service models?

Service models refer to permanent classifications that represent the logic housed by the
service, as well as its role within the overall solution.

16. What are the basic sets of common service models?

The basic sets of communication service models are:

i. Business service model

ii. Utility service model

iii. Controller service model

17. What is business service model?

The business service model is a model that encapsulates a distinct set of business logic within
a well-defined functional boundary. The business service model corresponds to the business
service layer in SOA abstraction layer.

18. List out some of the usage of business service model.

Business services are used within SOAs as follows:

i. as functional building blocks for the representation of business logic

ii. to represent a corporate entity or information set

iii. to represent business process logic

iv. as service composition members

19. What is utility service model?

40
Utility service is generic and non-application specific web service or service agent that is
designed for potential reuse.

20. List out some of the usage of utility service model.

Utility services are used within SOAs as follows:

i. as services that enable the characteristic of reuse within SOA

ii. as solution-agnostic intermediary services

iii. as services that promote the intrinsic interoperability characteristic of SOA

iv. as the services with the highest degree of autonomy

21. What does controller service model represent?

The controller service represents a service with a capability that is executing the parent
composition logic required to compose capabilities within other services. The controller
services can become subordinate service composition members.

22. List out some of the usage of controller service model.

Controller services are used within SOAs as follows:

i. to support and implement the principle of composability

ii. to leverage reuse opportunities

iii. to support autonomy in the other services

23. What is referred to as service description documents?

The individual documents that comprise a service contract are referred to as service
description documents.

24. What do service endpoints provide?

Service endpoint provides a formal definition of the endpoint interface and also establishes
the physical location of the service.

41
25. What are service descriptions?

A WSDL service description explains how the service description document itself is
organized. It is also known as WSDL service definition or just WSDL definition.

26. What are the categories of service description?

Service description id divided into two categories

i. Abstract description

ii. Concrete description

27. What does abstract description establish?

An abstract description establishes the interface characteristics of the web service without any
reference to the technology used to host or enable a web service to transmit messages.

28. What are the parts that comprise an abstract description?

The three main parts that comprise an abstract description are

i. Port type

ii. Operation

iii. Message

29. What does port type in abstract description provide?

Port type provides a high-level view of the service interface by sorting the messages a service
can process into groups of functions.

30. Define concrete description.

The concrete description portion of the WSDL file defines the connection needed from the
abstract web service interface to a physical transport protocol.

31. What are the parts that comprise concrete description?

The three main parts that comprise concrete description are


42
i. Binding

ii. Port

iii. Service

32. What is metadata?

Metadata provides information about the service.

33. What is the use of SOAP?

The Simple Object Access Protocol (SOAP) is used to define a standard message format
which is used for communication between services running on different operating systems.

34. List out some of the characteristics of SOAP messaging framework.

SOAP messaging framework ha the following three characteristics that are

i. Extensible

ii. Interoperable

iii. Independent

35. What are the parts of SOAP message?

SOAP message consists of the three parts:

SOAP envelope

SOAP header (optional)

SOAP body

SOAP fault

36. List out messaging styles offered by SOAP.

i. RPC (Remote Procedure Call) style

ii. Document – style

43
37. Sketch the anatomy of a SOAP message.

<?xml version=”1.0”?>

<soap:Envelope

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>

38. What is SOAP node?

The programs that use services to transmit and receive SOAP messages are referred to as
SOAP nodes.

39. What is called the SOAP message path?

The route taken by the message is called the SOAP message path. The set of SOAP nodes
through which the SOAP message passes, including the initial sender, the ultimate receiver
and one or more intermediaries are called the SOAP message path.

40. Define Message Exchange Pattern.

Message Exchange Pattern (MEP) defines the way that SOAP messages are exchanged
between the web service requester and web service provider. It represents a set of templates.
44
41. List out some primitive MEPs.

A common set of primitive MEPs are listed below

i. Request-response

ii. Fire-and-forget

iii. Complex MEPs

42. What is Publish-and-subscribe pattern?

Publish-and-subscribe pattern is an asynchronous MEP in which publisher sends messages to


all interested subscribers.

43. What is coordination?

Coordination is the act of one entity (known as the coordinator) disseminating information to
a number of participants for coordinating the activities of the web services that are part of a
business process.

44. Write down the layers of abstraction identified for SOA.

The three layers of abstraction identified for SOA are:

i. the application service layer

ii. the business service layer

iii. the orchestration service layer

45. List some of the characteristics of Application Service layer.

i. Expose functionality within a specific processing context

ii. Draw upon available resources within a given platform

iii. Solution – agnostic

iv. Generic and reusable

v. Achieve point-to-point integration with other application services

45
vi. Inconsistent in terms of the interface granularity they expose

vii. Mixture of custom-developed and third-party purchased services

PART - B

16 MARK QUESTIONS

1. Explain the service description with WSDL document.

2. Explain the SOAP message in detail.

3. Explain the general concept of web service or SOA architectural model.

4. Explain about atomic transactions in detail.

5. Explain about WS composite coordination in detail.

6. Explain about UDDI registry with its components.

UNIT - 5

BUILDING SOA-BASED APPLICATIONS

46
SYLLABUS: Service descriptions – WSDL – Messaging with SOAP – Service discovery –
UDDI – Message Exchange Patterns – Orchestration – Choreography –WS Transactions.

PART A

2 MARK QUESTIONS

1. Draw the fundamental software technology architecture layers.

2. Give the architecture components of J2EE to SOA.

i. Java Server Pages (JSPs)

ii. Struts

iii. Java Servlets

iv. Enterprise JavaBeans (EJBs)

3. What is JAX-WS?

JAX-WS is a technology for building web services using XML. In JAX-WS, a web service
operation invocation is represented by an XML-based protocol such as SOAP.

4. Expand SEI.

SEI stands for

• Service Endpoint Interface or

47
• Service Endpoint Implementation

5. What is SEI?

SEI is a java interface or class that declares the methods that a client can invoke on the
service.

6. Expand JAXB and JAXR.

JAXB stands for Java Architecture for XML Binding (JAXB)

JAXR stands for Java API for XML Registries (JAXR)

7. What is JAXB?

Java Architecture for XML binding API (JAXB) provides a means of generating Java classes
from XSD schemas and further abstracting XML-level development.

8. Give the general steps to use the JAXB API.

The general steps to use the JAXB API are:

i. Bind the schema

ii. Unmarshal

iii. Marshal

9. What are the steps needed to bind the schema?

Step 1: Generate classes

Step 2: Compile classes

10. What are the steps needed to unmarshal the schema?

Step 1: Generate content tree

Step 2: Validate (optional)

Step 3: Process the content

48
11. Write down the advantages of JAXB.

 It simplifies access to an XML document form a Java program.


 It uses memory efficiently.
 It is flexible.
 It allows transportation from one XML document to another.

12. What is JAXR?

The Java API for XML Registries (JAXR) provides a uniform and standard Java API for
accessing various kinds of XML registries.

13. What are the components of JAXR?

i. JAXR client

ii. JAXR provider

14. Write down the packages that are implemented by JAXR.

i. javax.xml.registry

ii. javax.xml.registry.infomodel

15. What are the tasks involved in managing registry data?

i. Getting authorization from the registry

ii. Creating an organization

iii. Adding classifications

iv. Adding services and service binding to an organization

v. Publishing a specification concept

vi. Removing data from the registry

16. Expand JAX-RPC and WSIT.

49
JAX-RPC stands for Java API for XML based RPC.

WSIT stands for Web Services Interoperability Technologies.

17. What is the use of JAX-RPC?

JAX-RPC is used for building and deploying SOAP+WSDL web services clients and
endpoints. It enables clients to invoke web services developed across heterogeneous
platforms.

18. What are the benefits of JAX-RPC?

i. Portable and interoperable web services

ii. Ease of development of web service endpoints and clients

iii. Increased developer productivity

iv. Support for open standards: XML, SOAP, WSDL

v. Standard API developed under Java Community Process (JCP)

vi. Support for tools

vii. RPC programming model with support for attachments

viii. Support for SOAP message processing model and extensions

ix. Secure web services

x. Extensible type mapping

19. Distinguish between WS-I and WSIT.

50
20. Expand CLS and CLR.

CLS – Common Language Specification

CLR – Common Language Runtime

21. What is Common Language Runtime?

The Common Language Runtime (CLR) is an execution environment. It works as a layer


between operating systems and te applications written in .net languages that conforms to the
Common Language Specification (CLS).

22. Give the features of CLR.

• Manages memory
 Allocation of memory
 De-allocation of memory (garbage collection)
• Thread execution support
• Code execution
• Code safety verification
• Compilation

23. What are three types of controls in asp.net?

i. HTML controls

ii. HTML Server controls

iii. Web Server controls

24. Give the benefits of WSE.

i. To build a wide range of application and infrastructure

ii. Flexibility

iii. Allows quick implementation

iv. Code the low-level XML details

51
25. Expand WS-BPEL.

WS-BPEL stands for Web Services Business Process Execution Language.

26. What is WS-BPEL?

WS-BPEL is an XML based language (ie., it is described by a grammar) enabling users to


describe business process activities as Web Services and define how they can be connected to
accomplish specific tasks.

27. Draw the WS-BPEL family tree.

28. What is the process element?

An <process> element is the root element and must have a name attribute for assigning the
name value. It is used to establish the process definition related namespace.

29. What does the partnerLink element define?

The partnetLink define the services that are orchestrated by the process. It contain a set of
<partnerLink> element each represent the communication exchange between two partners ie.,
the process service being one partner and another service being the other.

30. What are the attributes in the partnerLink element?

i. myRole

52
ii. partnerRole

31. What is the use of myRole attribute?

i. Used when the process service is invoked by a partner client service.

ii. Process service acts as the service provider.

32. What is the use of partnerRole attribute?

i. Identifies the partner service that the process service will be invoking

ii. Partner service acts as the service provider

33. What is the use of the partnerLinkType elements?

The partnerLinkType elements are used to identify the WSDL portType elements referenced
by the partnerLink elements within the process definition.

34. What does the variables element hold?

Varables hold the data that constitute the state of a BPEL business process during runtime.

35. List out the attributes of the variables element?

• MessageType

• Element

• Type

36. What is the getVariableProperty function?

The getVariableProperty function allows global property values to be retrieved from


variables. It simply accepts the variable and property names as input and returns the
requested value.

37. Give the syntax for getVariableProperty function.

53
Syntax:

getVariableProperty(variable name, property name)

Example

getVariableProperty(“TicketApproval”,”class”)

38. What is the getVariableData function?

The gatVariableData function has a mandatory variable name parameter and two optional
arguments that can be used to specify a part of the variable data.

39. Give the syntax for getVariableData function.

Syntax

getVariableData(variable name, part name, location path)

Example

getVariableData(“input”,’”payload”,”/tns:TimesheetType/Hours/...”)

40. What is the use of invoke element?

The <invoke> activity is used to invoke the web service operations provided by partners.

41. What are five common attributes equipped with invoke element?

i. partnerLink

ii. portType

iii. operation

iv. inputVariable

PART - B

16 MARK QUESTIONS

1. Explain the SOA delivery lifecycle phases.

54
2. Explain the JAX-RPC service concepts in detail.

3. Explain the objective and process of service oriented analysis.

4. Explain the objective and process of service oriented design.

5. Explain the WS-BPEL process definition structure.

6. Explain the service design guidelines in detail.

7. Explain the WS-Security policy n detail.

55

You might also like