Académique Documents
Professionnel Documents
Culture Documents
V0.1
Programming Web Services! Exam questions & Answeres
The main difference between Saas and traditional software is that customers do not
pay for owning the software, but rather for using it.
coupling: The human-centric approach is faster and tightly coupled, whereas both
application-centric and automated web are loosely coupled and relatively slower.
8. What are the advantages of web services technology over the traditional
distributed computing technologies like CORBA, RMI and COM ?
Coupling: CORBA / RMI / COM makes the application integration tightly coupled,
whereas Web services makes application integration loosely coupled thereby
allowing it to be highly flexible. - CORBA / RMI / COM support only RPC whereas
web services support both RPC and document-centric messaging.
V0.1
Programming Web Services! Exam questions & Answeres
10.Explain the interaction between service requester, SOAP, WSDL and UDDI
in realizing a web service application.
10.1 The service requester queries the UDDI registry to find a service
! matching the search parameters.
10.2 The UDDI returns the location of the WSDL for the appropriate service.
10.3 The requester accesses the WSDL and gets the necessary data to invoke
! and use the Web service.
10.4 The requester creates a SOAP-message request and sends it to the web
! service.
10.5 The web service processes the incoming SOAP-message !request and
! sends back the SOAP-message response to the service ! requester.
• Registry approach.
• Registry first and the you can get some information.
• It has centralized register
• Indexed approach. (Google)
• They registry the index of services, like google.
• It doesn't has centralized register.
• Peer-To-Peer approach.
• Services stores in some nodes. Then it know some neighbors. When it has
to find some services, it ask to the neighbors. If they know, then finish; it
not, the neighbors will ask to their neighbors.
• Some times it can't guarantee that it can find the right services.
Registry approach is centralized and therefore faster than the other approaches. It
has the limitation that only the services registered in the registry are available.
V0.1
Programming Web Services! Exam questions & Answeres
Indexed approach involves the searching through out the web and therefore it is
slower. But the requester is left with a wider window of accessing many other web
services.
13.What are the differences between Web services and Application Service
Providers?
Permission: The service requester needs the permission of ASP to use a service.
Whereas the service requester does not need the permission to use a service in a
web service.
Granularity: Web Services can have different granularity, but ASP cannot.
V0.1
Programming Web Services! Exam questions & Answeres
Lecture 2: XML
1. Explain why do we have different XML parsing models?
2. What are the input(s) and output(s) of an XML Schema compiler? How
many times we need to invoke schema compiler during parsing?
3. What are the main parsing models? Give their advantages and
disadvantages.
Pull:
• Advantage:
• Disadvantage:
One-step:
• Advantage:
• Easy to manipulate XML documents.
• Parsing done in a single step.
• Disadvantage:
• More memory usage.
Hybrid:
• Advantage: Efficient usage of time and memory.
• Disadvantage:
V0.1
Programming Web Services! Exam questions & Answeres
4. We considered 4 parsing models for XML. Briefly explain them and suggest
in which cases each of them is more suitable to use. (2010)
Pull parsing:
• The application always has to ask the parser to give it the next piece of
information about the document.
• The XML community has not yet defined standard APIs for pull parsing.
Hybrid parsing
• This approach combines characteristics of the other three parsing models
• For example, combining pull parsing with one-step parsing.
• The application thinks itʼs working with a one-step parser, but as the
application keeps accessing more objects on the DOM tree, the parsing
continues incrementally.
5. What is the difference between import and include in XML schema reuse?
How?
Namespace collision: Using include you can retrieving the definitions but it makes
no namespace changes. Using import it merges schemas from multiple
namespaces into one schema. With import is possible to merge the contents of the
V0.1
Programming Web Services! Exam questions & Answeres
namespace into other namespace. You just have to specify the new namespace
when you are importing.
Different documents: With include, the fully qualified name of the elements needs
to be used. Then, if we include different document you cannot hide this fact.
Whereas on using import, this fact can be hidden cause we do not need to use the
fully qualified name.
The XML parser checks for both well-formed ness and validity of the XML
document.
To check the well-formedness the parser needs the XML document alone.
To check the validity of the document the parser needs the XML document and
either its DTD or schema document.
8. Show how you represent phone number “+46 8 790 04 13” in XML using
elements and using attributes? Give advantages and disadvantages of one
representation compare to another?
V0.1
Programming Web Services! Exam questions & Answeres
V0.1
Programming Web Services! Exam questions & Answeres
The XML schema compiler is a tool that analyzes the XML schema and code-
generates the corresponding marshalling and un-marshalling modules.
12. What are the 2 XML processing techniques? Explain the differences
between them. Give examples for both.
13. What is the difference between a pre-defined data type and constructed
data type.
Pre-defined data type are the data types that are already defined in the XML. eg:
string, positiveInteger, date, time etc.
Constructed data type can be any new data types which are constructed from the
pre-defined data types.
A simple element is an XML element that can contain only text. It cannot contain
any other elements or attributes.
Restriction implies that the values that an XML element contains are bound to
certain rules as defined in the schema document. For e.g. : The usage of
“xsd:enumeration” restricts the XML elementʼs values to limited set of values.
Similarly the usage if “xsd:pattern” restricts the XML elementʼs values to a certain
pattern.
V0.1
Programming Web Services! Exam questions & Answeres
16. List the basic schema reusability mechanisms in XML schema? Explain
the difference between intra-document reusability and inter-document
reusability.
Reusability mechanisms:
• Element reference
• Attribute reference
• Model groups reference
• Schema includes
• Schema imports
17. Which mechanisms for re-use in XML do you know? Briefly explain each
of them. (2010)
We can classify the mechanism to reuse XML into two types: Intra-XML reuse and
Inter-XML reuse.
The Intra-XML reusage refers to the mechanism that reuse a part of the same
document. In this case, the keyword "ref" is used.
The inter-XML reusage refers to the mechanism that reuse a part of other
document as their own. There are two types: "include" and "import".
When we use "include" we are reusing a part of other XML document without
changing its original namespace. But if we want to reuse parts of different
documents that have the same namespace, then the namespace collision could be
avoid using "import". With "import" we can merge the components of the
namespace and assign them new namespace
V0.1
Programming Web Services! Exam questions & Answeres
Lecture 3: SOAP
12. Give advantages of using SMTP for transporting SOAP messages.
•! Buffering and queuing of messages with reliable dispatch thereby
asynchronous mode of transfer.
•! MIME types can be attached and sent along. •! Email can support one-to-one
and one-to-many participant configurations. •! Internet e-mail server
infrastructure is highly scalable.
• Email messages have extensible headers that can be used to transmit context
information outside the SOAP messages.
V0.1