SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY

DEPARTMENT OF INFORMATION TECHNOLOGY

WEB TECHNOLOGY

QUESTION BANK

2 MARK QUESTION AND ANSWERS

UNIT I

1. What are the basic components of web services model?

The basic components of webservice model are

1. Service-oriented architecture

2. Service roles

3. Technology stack

4. Architectural processes

5. Value Chain

2. Define SOA?

Service oriented Architecture forms the basis of the web services model. SOA involved from object oriented model, in which you treat all entities as objects. In SOA you treat all entities as Services.

3. List out the features of service model?

The service model has following features:

Service –abstraction

Service –encapsulation

Service –modularity

Service-polymorphism

4. What is service abstraction?

Service-abstraction defines the characteristics of the service

Example: For an eshopping application it consists of two sub task.

The service is divided into two subprocesses, which can include any of the following

1. Authorizing the accessing client system

2. Validating the arguments

3. Database query and lookup

4. Authenticating the credit

5. Generating application exceptions

6. Returning a logical output

5. What is service modularity?

Service-modularity partitions the service into loosely coupled modules of service abstractions that you can combine with each other to create a reusable service library.

6. What is service encapsulation?

After defining the characteristics of the service, hiding the rationale processes of the service from the user is essential. Hiding the process from the user of the service is known as service-encapsulation.

7. What is service polymorphism?

Service polymorphism provides the capability to invoke different service behaviors by using a single, generically defined service interface of a service-abstraction. The service interface exposes various service methods of a web service. Service polymorphism enables the dynamic runtime binding of services.

8. List out service roles?

Following are the roles that web-service applications can play in the SOA

1.Service provider

2. Service broker

3. Service requestor

9. What is the role of Service provider?

Service provider is a generic role, applicable to either a web-services module or a business entity. The role comprises of following phases:

1. Creation

a)Analysis and design

b)Development and testing of the service framework

c)Documents

d)Deployment of the services on the processing nodes.

2. Publishing

3.Perserverance

a)Waiting for a requestor to bind to the provider nodes

b)Management of a dormant state through some activation logic.

c)lease management.

10. What is the role of service broker?

A service broker is a centralized registry that contains an index of all the published services of the service providers.

Following are the service provider roles

1. Startup and registration of the broker to a centralized URL.

2. Providing a portal for the registration of web services.

3. Making the services available to the consumers.

4. Managing request-response activities at the time of both publishing and subscription.

11. What is the role of service requestor?

A service requestor is a distributed client on the internet who is interested in availing of the service that the providers offers.

The following stages are associated with the service-requestor role:

1. Preliminary

1. prepare a requirement list

2. classify the requirements based on services

3. draft a plan of action

2.Discovery

1. Look for a central registry for services that can satisfy the current needs

2. Discover those services

3. Obtain the proxy for the service-abstraction from the provider.

3. Invocation

1. Bind to the service-abstraction on the processing nodes of the provider

2. Invoke the service by using the service interface that the provider publishes.

12. Define technology stack?

The technology stack is the component of the webservices model that provides a high level view of the layered architecture of SOA.

The following standards constitute the technology stack of the webservices model

1. Simple object Access Protocol(SOAP)

2. Web Services Description Language(WSDL)

3. Web Services Flow Language(WSFL)

4. Universal Description, Discovery Integration(UDDI)

5.Electronic Business Extensible Markup Language(ebXML)

13. What is the partial list of protocol?

A partial list of these protocols and standards is as follows:

Hyper textTransfer Protocol (HTTP)

Simple Mail Transfer Protocol

File transfer Protocol

Message broker

Internet Inter-ORB Protocol(IIOP)

14. List out Core and emergent standards of SOA Stack?

1. Core layers are

SOAP

XML

Common Internet Protocols

2. Emerging Layers are

Emerging business rules

WSFL

UDDI

WSDL

15. List out the primary process involved in web service model.

Following are primary processes involved in the web-services model:

Description

Discovery

Invocation

16. Define yellow pages

White pages provides a directory mechanism for registering the web services specific to the name of the business entity, contact information, IDs, or any other description.

UNIT II

1. Define XML with an example?

  • XML stands for EXtensible Markup Language
  • XML is a markup language much like HTML
  • XML was designed to carry data, not to display data
  • XML tags are not predefined. You must define your own tags
  • XML is designed to be self-descriptive
  • XML is a W3C Recommendation

2. Explain the difference between XML and HTML

XML is not a replacement for HTML.

XML and HTML were designed with different goals:

  • XML was designed to transport and store data, with focus on what data is
  • HTML was designed to display data, with focus on how data looks

HTML is about displaying information, while XML is about carrying information.

3. Explain well-formedness of xml document?

All XML Elements Must Have a Closing Tag

XML Tags are Case Sensitive

XML Elements Must be Properly Nested

XML Documents Must Have a Root Element

XML Attribute Values Must be Quoted

All tags have only one root tag.

4. How will you comment a statement in xml?

Xml document can be commented as follows.

Example :

<! – This is a comment 

5. List out the components of xml document?

1.Prolog

a. xml declatration

b. Document type declaration

c. Comments

d. Processing instructions (PI)

2. Elements

3. CDATA sections

4. Attributes

5. Entity

6. What is prolog?

Prolog refers to the first few lines of code that you write in the xml document. It may contain your xml declaration, which reads as follows:

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

7. List out escape sequence for special mark up element?

Some characters have a special meaning in XML.

There are 5 predefined entity references in XML:

&lt; / less than
&gt; / greater than
&amp; / ampersand
&apos; / ' / apostrophe
&quot; / " / quotation mark

8. List out the content specification types?

1.CDATA

2.PCDATA

3.EMPTY

4.Children

5.Mixed

6.ANY

9. List out the qualifier for the child element?

The following are the qualifiers for the child element and their meaning

QualifierMeaning

1. *Zero or more

2. +One or more

3. ?Zero or one

10. What is the use of mixed content specification?

Mixed content specification indicatres that you can use PCDATA and other possible child elements, such as mixture. You declare PCDATA first, following it with other child elements that you separate with a | symbol, which you follow with a * qualifier on the entire content.

11. Give an example for the empty content specification?

EMPTY indicates that you do not have any content that needs presenting. These elements are known as empty tags. You can present an empty an empty tag as a standalone tag (<hr/>

12. Define an attribute in xml?

An attribute declaration indicates that a given element has an attribute, which eventually contains some value that is specific to the attribute and erelavent to the element.

13. List out the attribute specification parameters?

The attribute specification parameters are

SpecificationMeaning

#REQUIREDThe attribute value must be specified in the document proper.

#IMPLIEDThe attribute value need not be specified. If the attribute value is

not specified, “defaultvalue” is used.

“defaultvalue”The default attribute value is used. For example, “OPN” can be a

default value.

#FIXED “fixedvalue”This attribute value should always use the “fixedvalue” and not

any other values in the document proper. Forexample “PROP” can

be a fixed value.

14. What is an entity? Give an example?

An entity is a distinct individual element that you can include in a xml document. Specifically, entities are storage units for data.

There are different types of entities that you can refer to are as follows:

1. Character entities

2. General entities

3. Parameter entities

15. What is parameter entity?

Parameter entities are entities that are similar to general entities but that you declare in a DTD and also refer to from within a DTD. You cannot refer them from xml document.

Example

<!ENTITY % someparam “Parameter value”>

16. What is xml namespace?

Xml namespace is a mechanism exists for preventing name conflicts for contents in the xml documents and DTD devise you xml namespace.

17. Why use EDI standards?

EDI standards facilitate electronic data interchange (EDI) by providing:

• Rules of syntax

• Definition of the data organization

• Editing rules and conventions

• Published public documentation

EDI standards:

• Allow an ‘open’ system

• Reduce implementation effort

• Provide ‘third-party interfaces’

18. What is EDIFact?

EDIFACT is an acronym for EDI For Administration, Commerce and Transport. It coordinatesinternational standardization by working through the UN/ECE (United Nations/EconomicCommission for Europe). It provides:

• an international EDI standard

• a set of syntax rules

• data elements, segments and codes

• messages

19. What is Message Definition?

A message is a single business document. Each message is identified by a six character name.

From the buyer-side these include:

• ORDERS—Purchase Orders

• CUSDEC—Customs Declaration

• IFTMIN—Instruction Message

• REMADV—Remittance Advice

• PAYORD—Payment Order

Seller-side messages include:

• IFTMAN—Arrival Notice

• CUSRES—Custom Response

• INVOIC—Invoices

Messages are made up of a collection of sequenced segments within defined areas. Some segmentsmay be used in more than one area. The segments that can be used in each area are definedby the EDIFACT documentation. EDIFACT provides a hierarchical structure for messages.

20. What is segment table?

The message structure is defined in segment tables. These give the ‘rules’ of the message. Theyalso show which segments are used in a particular message and the order in which the segmentsmust appear.

21. Define segment?

A segment is a collection of logically-related data elements in a fixed, defined sequence. Segmentscontain:

• A three-character alphanumeric code that identifies the segment. This is called thesegment tag.

Variable length data elements. These can be either simple or composite.

Segments must be separated by a data element separator (data element delimeter), which is normally+ and :, and terminated by a segment terminator, normally ‘.

All segments are fully documented in the United Nations Trade Data Interchange Directory(UNTDID). These tables list the segment position, segment tag and segment name. Segmenttables also specify if a segment must appear in a message using the requirements designator M(Mandatory) or C (Conditional), and how many times a particular segment may repeat (repetitionfield).

22. List out the different kinds of segments?

In EDIFACT, there are two kinds of segments:

Service Segments

Generic Segments

Service Segments are:

• Envelopes (UNB-UNZ, UNG-UNE, UNH-UNT)

• Delimiter String Advice (UNA)

• Section Separator (UNS)

Generic Segments are:

• DOC to identify and specify documents

• MOA for monetary amounts

• DTM for dates and times

• NAD for name and address data

23. What is mapping?

There are almost as many business applications as there are businesses. In the early days, eachbusiness had its own applications for tracking merchandise, ordering, invoicing, accounts payable,receivable, and other business needs. We soon realized that:

1. The computer applications of one business couldn’t talk to those of another. This meantre-entering all data that was received.

2. The applications in one department of a business couldn’t talk to those of another in thesame business—order entry couldn’t talk to invoicing which couldn’t talk to accounts

receivable.

24. What is electronic enveloping?

EDIFACT has two required levels of envelopes:

Interchange (UNB/UNZ): a set from one sender’s mailbox address to another sender’s mailboxaddress

Message (UNH/UNT): the envelope around one particular message

UNIT III

1. List out the elements of J2EE?

1. J2EE platyform

2. J2EE compatibility

3. J2EE Reference implementation

4. J2EE Blue prints

2. List out the services offered by J2EE?

1. Runtime component services

2. Runtime infrastructure services

3. List out the runtime application-component specifications.

1. Application client

2. Applets

3. JSP and servlets

4. Enterprise java beans

4. List out the infra structural services

1. J2EE Container

2. J2EE Server

5. Define J2EE container

It is a runtime context for the application components of the J2EE platform. It provides primary services such as Transaction, concurrency, persistence, distributeness, naming and security

6. Define J2EE server.

It is the server that has the capability to host JSPs, servlets, and EJB Components within the server framework.

7. List out the Different API in the J2EE

1.Java servlets

2. JSP

3.EJB architecture

4. JDBC

5. JNDI

6. JTA

7. JTS

8. JMS

9. JAVA IDL

10. RMI-IIOP

11.Java Mail

8. List out the Java API used in web services

1. Java API for XML Processing (JAXP)

2. Java API for XML Binding (JAXB)

3. Java API for XML Messaging (JAXM)

4. Java API for XML RPC (JAX-RPC)

5. Java API for XML Registries (JAXR)

9. What is JWSDP?

Java Web Service Developer Pack is a bundling of JAX Pack,JSTL, a Tomcat container, a registry server, and a build tool known as Ant from Apache.

10. List out the beans and their uses

1. Session bean

2. Entity bean

11. Define MVC Architecture

Model–View–Controller (MVC) is a software architecture,[1] currently considered an architectural pattern used in software engineering. The pattern isolates "domain logic" (the application logic for the user) from input and presentation (UI), permitting independent development, testing and maintenance of each.

12. Differentiate CGI vs Servlets

Servlets are only instantiated when the client first accesses the program. All subsequent accesses are done to that instance.This keeps the response time of servlets lower than that of CGI programs, which must be run once per hit.also because servlet is instantiated only once,all accesses are put through that one object. This helps in maintaining objects like internal connection,pooling or user session tracking and lots of other features.

13. What is servlets

A Servlet is a Java class which conforms to the Java Servlet API, a protocol by which a Java class may respond to HTTP requests. Thus, a software developer may use a servlet to add dynamic content to a Web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML. Servlets are the Java counterpart to non-Java dynamic Web content technologies such as CGI and ASP.NET. Servlets can maintain state in session variables across many server transactions by using HTTP cookies, or URL rewriting.

14. List out the classes used for Server side programming in servlets?

1. HttpServlet class

2. HttpServletRequest interface

3. HttpServletResponse interface

4. ServletConfig class

15. Why getServletInfo method is used?

The getServletInfo method returns a short description of the servlet tool, such as an IDE, which wants to host the servlet

16. How will you invoke a servlet in web browser?

17. List the servlet invocation URL and their purpose?

1.server – The name of the host

2. port – The service port on which the web container listening

3. Loader- The server loader

18. What is the use of doGet() and doPost() methods in servlets?.

When you invoke a Servlet, the servlet engine passes the information on to the Servlets service() method. This method determines the type of request made (GET, POST, HEAD, ...) and calls the function doTYPE, like doGet, doPost. GET and POST just differ in the way form data is sent from the browser to the server. The method doGet handles data that has been attached to the url in the form url questionmark (name=value ampersand)+. Typically in a CGI you would have to read the environment variable QUERY_STRING to get this string of concatenated parameternames and values. With the doPost method, form data comes in through standard input stream, a cgi would just need to open the input stream and read until EOF to get the form data.

19. What is servlet concurrency?

Whenever any request comes to a servlet it executes in its own thread. This may only cause the problems when you have instance variables in your servlet, so avoinding instance variables in a servlets can resolve any threading issue.
If you want more than one instance, then you can implment the SingleThreadModel in your servlet then the servlet constainer will decide whether it needs to create more than one instance to serve the request or not, it may not gurantee the creation of a new instance though.

20. Differentiate between statefull and stateless protocol?

When stateless protocol is used between a server and the client, the server does not remember anything. It treats any message from a client as the client's first message and responds with the same effects every time.
Stateful protocol means the server remembers what a client has done before. So, for example, if client says "Hello" and the server says "Hello" back. Then, the client says "Hello" again and the server says "What?". The server knows the client has said "Hello" before, and changes its answer event it hears the same thing from the client.

UNIT IV

1. Define HTML with example?

HTML is a language for describing web pages.

  • HTML stands for Hyper Text Markup Language
  • HTML is not a programming language, it is a markup language
  • A markup language is a set of markup tags
  • HTML uses markup tags to describe web pages

2. List out the basic tags in HTML?