Professional Documents
Culture Documents
PWS Exam Questions 2005 - 2010 V1.0
PWS Exam Questions 2005 - 2010 V1.0
1. What is Service Oriented Architecture (SOA)? Which roles and which operations
it assumes?
SOA is an architectural concept where the software components are modeled as services.
These services will have a well-defined interface through which the other services can
interact with each other to achieve a business purpose. It enables the publishing and
consumption of software services.
The main difference between Saas and traditional software is that customers do not pay
for owning the software, but rather for using it.
Location: In human-centric approach, the humans should have a knowledge of the exact
location of the service. In both application-centric and automated web, humans do not
need to have the location of the service.
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 ?
Invocation: CORBA / RMI / COM are synchronous method invocation techniques, where
as Web services are asynchronous.
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.
Integration: CORBA / RMI / COM are suitable for intra-enterprise application integration,
whereas Web service is suitable for inter-enterprise application integration.
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.
11. What are the various service discovery approaches? Explain their advantages
and disadvantages. Which of these approaches are being used in SOA ? Service
discovery approaches are:
• 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.
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.
In Peer-To-Peer approach, the search is to be done on only those peers attached to the
registry. Thus it is relatively faster than indexed approach and relatively slower than the
registry approach. The requester can only access the services registered in the peers.
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.
14. Compare the component based model and web service model.
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:
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 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.
An XML document is said to be well-formed if it is conformant with the XML syntax rules.
An XML document is said to be valid if it is conformant with the applied format as defined
either in a Document Type Definition (DTD) document or a XML schema document.
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.
V1.0 Last modification: 01/06/2010! Page 7
Programming Web Services! Exam questions & Answers
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?
10. Explain difference between document centric and data-centric XML. Which one
is used in Web Services? Compare them.
• Ratio markup: The ratio of markup to content in data-centric is much higher than in
document-centric XML
• Machine-generated: Data-centric often includes a machine-generated information
• Structure: The document and tags are highly structured in data-centric.
• Data structure: Data-centric is easily related to a data structure
• Living Time: Data-centric usually living shorter time than document-centric
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.
XML Structure: Syntax oriented processing depends on the XML structure. Applications
have to work with elements, attributes and pieces of text. Whereas data centric approach
does not depend on the XML structure.
XML Schema compiler: Syntax oriented approach does not use any XML schema
compiler where data-centric uses XML schema compiler.
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.
14. What is the difference between simpleType and complexType elements in XML
schema.
A simple element is an XML element that can contain only text. It cannot contain any
other elements or attributes.
A complex element is an XML element that contains other elements and/or attributes.
V1.0 Last modification: 01/06/2010! Page 9
Programming Web Services! Exam questions & Answers
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.
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
In intra-document reusability the elements are reused in the same schema document.
In inter-document reusability the elements of a schema document are reused in a
different document.
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
The reasons there are so many different models for parsing XML have to do with trade-
offs between memory efficiency, computational efficiency, and ease of programming.
Intermediaries are the nodes that exist in the SOAP message path in between the service
requestor and the service provider. Their purpose is to process the header part of the
SOAP message thereby providing secured exchange of SOAP messages, notarization,
providing message tracing facilities etc. It therefore provides horizontal extensibility
3. What are possible values of the role attribute in SOAP headers? Briefly explain
the meaning of its special values.
The possible values of the role attribute will be the URI of the intermediary node or that of
the ultimate service provider node.
Using the headers to add functionality for the SOAP messages is called as the vertical
extensibility. This can include adding information regarding the security, routing,
notarization etc. It is implemented over the middleware layer of the SOAP binding
framework.
Horizontal extensibility is the process of targeting the different parts of the same SOAP
message to different recipients. This is achieved through the intermediaries. This is done
in order to allow the processing of the header elements by different nodes.
5. Why do we place some information in the headers and some information in the
body of SOAP message? What is/are main criteria(s) for making decision about
such placement?
Header contains auxiliary information and itʼs optional. Body contains main information.
Header can contain authentication information, routing information, actor/role attribute,
mustUnderstand attribute, ...
The Body contains the actual SOAP message intended for the ultimate endpoint of the
message. The header contains informations that could be processed by intermediate
nodes.
6. Which predefined attributes of SOAP headers you know? Briefly explain them?
7. What are RPC conventions in SOAP? How different types of parameters are sent
in SOAP messages?
The name of the request struct is the name of the method and arguments are puts inside
as elements.
The RPC convention said that the name of the response struct is the name of the method
with Response appended to the end.
There are two types of parameters that could be send in SOAP message: out and inout.
1. Determine the set of roles that the node is to act. This is decided by going through all
the header elements.
2. Identify all the header blocks targeted at the node that are mandatory.
3. If any of the elements identified in the above step are not understood then generate a
SOAP fault message with code set to env:mustUnderstood. And processing in stopped.
4. Process all mandatory headers targeted at the node. If the node is the ultimate node
then the body is also processed.
5. Relay the message if it is intermediary.
Feature is a semantic that has a name and a specification. Eg: security, reliable
messaging, quality of service etc. They are expressed by bindings and modules.
10. What is role in SOAP headers and what kind of information they usually include?
V1.0 Last modification: 01/06/2010! Page 13
Programming Web Services! Exam questions & Answers
Role specifies the node which has to process the header element. It is usually denoted as
a URI of the node. It can have some special values like none, ultimateReceiver and next.
The HTTP POST operation is usually used by the SOAP message exchanges.
12. Explain what is Message Exchange Pattern (MEP)? What are standard MEPs in
SOAP?
MEPs are features that specify how many messages move around in a given interaction,
from where they originate and to where they terminate. The 2 standard MEPs are
Request-Response MEP:
This involves a requesting node and a responding node. The requesting node sends its
requests in the form of a SOAP message. The responding node processes this SOAP
request and sends back the SOAP response message.
This involves a requesting node and a response node. The requesting node does not
necessarily send a SOAP message, so the responding node does not trigger the SOAP
processing model. But the response message will be a SOAP response message.
13. What is the main difference in processing SOAP message by intermediary node
and by service provider node? (03 - 2010)
The intermediary node processes header and the service provider processes both header
and the body.
14. In the class we considered the following guiding schema for selection of data
encoding in SOAP. Your task is to fill in cells which have question mark (you can
put labels into the cells and then refer to them)
15. What
is SOAP
data
model?
Give an example.
The data model is an abstract representation of the data structures.
<product
! soapenv:encodingStyle=”http://www.w3.org/2003/05/soap-encoding”>
! <sku> 947-TI </sku>
! <name>Titanium glider </name>
! <type> skateboard </type>
! <desc> Street-style titanium </desc>
! <price> 129.00 </price>
! <inStock> 36 </inStock>
</product>
The encoding is a set of rules to map that data model into XML to send by SOAP
message.
The feature is a semantic that has a name and a specification. For example, the
authentication feature or the colour feature.
The properties are pieces of states named with URI which affect the operation of features.
For example, for the security, the properties could be the username and the password.
17. Explain how the same feature can be expressed by binding and by modules.
A binding is a means for performing functions below the SOAP processing model; and a
module is a means for performing functions using the SOAP processing model, via
headers.
For example, if we want to have a “security channel” feature, we might imagine a SOAP
binding to the HTTPS protocol, which would specify that it implements the http://
skatestown.com/secureChannel features. The binding specification would indicate that it
natively supports this feature.
Using SOAP module it could provides encryption and signing of a SOAP message across
any binding.
Advantages of RESTful
• Lightweight: it doesn't require a lot of markup
• Easy to build: It doesn't required any toolkit.
• Low bandwidth consuming
Disadvantage of RESTful
• Service discovery: Client should know the address of the service.
• Not complex requirements: It cannot address complex requirements
• Not asynchronous mode: It cannot handle asynchronous processing and invocation
• Mutual understanding: The service producer and the service consumer have to had a
mutual understanding of the context and the content.
Lecture 4: WSDL
The part mechanism in WSDL is to decompose the WSDL messages in to simpler units or
parts.
Each part can be shown in different ways depending on the network protocol chosen for
the web service.
The part may be referred by the binding in order to specify the binding-specific information
about the part.
Example of usage:
! <message name=”checkInvoiceRequest”>
! ! <part name=”invoiceNumber” type=”xsd:integer”/>
! </message>
The part in the above WSDL code refers to the invoice number parameter to be sent to the
web service.
The functional description defines details of how theWeb service is invoked, where itʼs
invoked, and so on.
This description is focused on details of the syntax of the message and how to configure
the network protocols to deliver the message.
The nonfunctional description provides other details that are secondary to the message.
For example, security policy or privacy policy.
Other example could be that It could instruct the requestorʼs runtime environment to
include additional SOAP headers
What: WSDL
Who: WS-Policy
Why: WS-Policy
Where: WSDL
How: WSDL and WS-Policy.
5. Explain the differences between the “document” and “RPC” values of the style
attribute of the binding element. For which kind of “portType” you should use a
“document” style binding?
The style attribute of binding indicates that operations will follow a document-centric
approach or a RPC approach.
The document-centric approach means the body of the SOAP message is to be
interpreted as XML.
The RPC approach indicates that binding uses the Remote Procedure Call (RPC)
conventions for the SOAP body.
The document style should be only used when itʼs binding for portTypes that reference
messages that contain parts using the element attribute.
If a portType references a message whose parts use the type attribute, you should define
only RPC bindings for it.
The binding element provides the concrete implementation of the WS interface defined by
the portType element. It denotes the protocol that will be used to bind and send the SOAP
messages, the style (RPC or document-centric) of the message, operations and their
corresponding messages to be sent and received.
7. Normal form in WS-Policy. What does it mean? Give an example of its usage.
It means that the policy assertions are re-written so that all the possible combinations are
considered. It usually begins with the wsp:ExactlyOne.
Example:
! <wsp:Policy ...>
! ! <wsp:All>
! ! ! <wsp:ExactlyOne>
! ! ! ! <nsSecurityAssertion wsp:Optional=”true” />
! ! ! ! <nsReliableMessagingAssertion />
! ! ! </wsp:ExactlyOne>
! ! ! <nsTransactionAssertion />
! ! ! <nsAuditAssertion />
! ! </wsp:All>
! </wsp:Policy>
! </wsp:Policy>
Normalization: In normalization, the policy assertions are re-written so that all the
possible combinations are considered. It usually begins with wsp:ExactlyOne.
Merging: Union operation in set theory. It put together all the possible policies.
Intersection: It involves the merging of two policies into a single one where only those
policies that are common to both are considered.
We normalize the policy cause for merging and intersection itʼs easier do them if the policy
is already in normal form.
Merge is used when we have hierarchy of elements and each element has its own policy.
Then put all together we can create the join policy for all them.
The intersection is applied when the sender and the receiver have different policy, and the
policy can be applied only when both of them understand it. If one of them cannot
understand it, you cannot send the message. Then we can make intersection of the
policies and apply it both to the receiver and the sender.
11. Explain role of the binding element in a WSDL document. Which standard
binding extensions are defined in WSDL
Binding element defines how will the message be transmitted and what are SOAP-specific
details (message format and protocol details).
The standard binding extensions that are defined in WSDL are SOAP, HTTP GET/POST
operations, and MIME attachments.
1. All: This policy states that all of the assertions are in effect.
! Example:
! ! <wsp:Policy name=”PolicyExample1”
! ! ! TargetNamespace=”http://ww.skatestown.com/policies” >
! ! ! <wsp:all>
! ! ! ! <Assertion:A />
! ! ! ! <Assertion:B />
! ! ! ! <Assertion:C />
! ! ! </wsp:all>
! ! </wsp:Policy>
2. ExactlyOne: This policy states that ONLY ONE of the assertions A, B and C is
effect.
! Example:
! ! <wsp:Policy name=”PolicyExample2”
! ! ! TargetNamespace=”http://www.skatestown.com/policies” >
! ! ! <wsp:ExactlyOne>
! ! ! ! <Assertion: A />
! ! ! ! <Assertion:B />
! ! ! ! <Assertion:C />
! ! ! </wsp:ExactlyOne>
! ! </wsp:Policy>
3. OneOrMore: This policy states that some subset of the policy assertions listed as
child element is in effect.
4. Others: The operators can nest. Any of the Assertion elements can be replaced by
an operator.
Lecture 5: UDDI
Basic:
• A set of data structure specifications to store the metadata in the registry.
• A set of create, read, update and delete(CRUD) operations to manipulate the data
structure in the registry.
Metadata:
• Ownership and containment.
• Categorization
• A logical referencing mechanism.
Operations:
• Authentication for operations that change the registry.
• Open access for read and query operations.
3. What are main mechanisms of Web services discovery? Briefly explain each of
them. Which of them is mainly used in web services discovery?
In the first approach, the service provider sends the service description through email, ftp
or CD to the service requestor in accordance to a previously agreed business
partnership. This is a static and a very simple approach.
The WSDL repository is a distributed approach where the service requestor searches in
a wide range of distributed repository of service descriptions. This approach is much
more dynamic.
The UDDI approach provides the concept of point to a service definition. The providers
can define a taxonomical classification of their services, provide a new technical
model, reference an existing technical model which might later be used by other service
providers. The provider can change his service description without changing the UDDI
reference.
V1.0 Last modification: 01/06/2010! Page 24
Programming Web Services! Exam questions & Answers
4. What are main data structures in the UDDI description? Explain briefly their roles.
• businessServices:
• It describes a group of related Web service offered by a businessEntity.
• bindingTemplate:
• It provides technical information necessary to use a Web services.
• tModel:
• It acts as generic container for any kind of specification
• publisherAssertion:
• It defines a relationship between two or more businessEntity elements.
5. Which changes will appear in the businessEntity element after the invocation of
the save_business operation for this businessEntity element for the first time?
• Service interface -> tModel. As the service interface in the WSDL defines a reusable
definition of a service it corresponds to the tModel of the UDDI. If the service interface
definition contains more than one binding element then the reference to the service
interface may include a pointer to a specific WSDL binding element.
• Service implementation -> businessService: The service implementation is defined
by the WSDL service element which corresponds to the businessService element.
• Service location -> accessPoint: The web service location listed in the WSDL port
element must be the same as the accessPoint element in UDDI.
7. What is tModel and what is its role in UDDI? Give an example of its usage.
Example:
! <tModel tModelKey=”...YahootModelKey...”>
! ! <name>Yahoo! Business Taxonomy</name>
! ! <description xml:lang=”en”>Yahoo! Business Taxonomy</description>
! ! <categoryBag>
! ! ! <keyedReference keyName=”Yahoo! category”
! ! ! ! keyValue=”categorization”
! ! ! ! tModelKey=”...sometModeKey...”>
! ! </categoryBag>
! </tModel>
! <categoryBag>
! ! <keyedReference keyName=”Sporting and Athletic Goods Manufacturing”
! ! ! keyValue=”33992”
! ! ! tModelKey=”...NAICStModelKey...” />
! ! <keyedReference keyName=”New York”
! ! ! keyValue=”US-NY”
! ! ! tModelKey=”...ISO3166tModelKey...”>
! ! <keyedReference keyName=”Yahoo Business Taxonomy”
! ! ! keyValue=”Business_and_Economy/Shopping_and_Services/Sports/
! ! ! ! ! ! ! skateboarding/Deck_andTruck_Makers/”
! ! ! tModelKey=”...YahootModelKey”>
! </categoryBag>
To describe out identification we use the identifierBag. With that the users can search
(discover) your business with a specific identifier like D-U-N-S number.
Example:
<identifierBag>
! <keyedReference keyName=”DUNS”
! ! keyValue=”00-11-1111”
! ! tModelKey=”...D-U-N-StModelKey...” />
</identifierBag>
static/dynamic finding: dIn registry-based approach, the service requestor has a static
knowledge on the location of the registry. In index based approach the requestor should
dynamically find for the location of several registries through some search operations.
Limitation: In registry-based approach the requestor is bound to the limit of the registry,
whereas in index based approach the requestor is has no bounds as it can search through
the entire range of options available.
Lecture 6: WS-Security.
• WS-Security: It defines on
• how to include the security tokens in SOAP messages and
• how to protect messages with digital signatures and encryption.
• WS-policy: Provide a framework for describing Web services Meta-information.
• WS-Trust: It prescribes an interaction protocol to obtain Security Tokens Services.
• WS-SecureConversation: It defines a security context with which parties can share a
secret key to sign and encrypt parts of messages efficiently.
• WS-Federation: Provides a framework for federating multiple security domains.
• WS-Privacy: Provides a framework for describing the privacy policy of web services.
• WS-Authorization: Defines on how to exchange the authorization information among
parties.
Key: In symmetric key the same key is used on both the sender and receiver side to
encrypt and decrypt messages. In asymmetric encryption the receiverʼs public key is used
to encrypt the message on the sender side and the receiverʼs private key is used to
decrypt the message on the receiver side.
Speed: The asymmetric encryption is much slower than symmetric encryption technique.
Asymmetric encryption is suitable for web services. This is because the usage of different
keys ensures authorization.
Authentication and message integrity can be ensured by digital signatures which
implements asymmetric encryption.
3. What is a security model for web services? What are its purposes? What are the
elements of this model?
The security model provides a model for a secured transaction of messages between the
service requestor and the service provider.
A third entity name security authority comes into play in order to provide security token
for the requestor.
V1.0 Last modification: 01/06/2010! Page 29
Programming Web Services! Exam questions & Answers
1. Privacy: The transmitted information has not been captured or passed to a third
party without your knowledge.
2. Integrity: Guarantee message not changed during the transmission.
3. Authentication: Guarantee the identity of the sender and the receive..
4. Authorization: manage access to protected resources.
5. Non-repudiation: Guarantee that the message sender cannot deny having sent it.
6. Availability: Guarantee that the system operates continuously.
The user provides his authentication information namely user id and password only once
to access several applications within a certain interval of time. This is called as single sign-
on.
6. What is WS-Trust? Why do we need WS-Trust? What is the difference between the
usage of PKI and Kerberos in WS-Trust?
• In Kerberos, the token type is TGT where as in PKI the token type is certificate.
WS-SecurityPolicy will be usually mentioned under the WS-Policy of the Web services
description (WSDL) file.
It defines a security context with which parties can share a secret key to sign and encrypt
parts of messages efficiently.
<wsse:Security
! xmlns:wsse=“http://schemas.xmlsoap.org/ws/2003/06/secext”>
! <Signature xmlns=“http://www.w3.org/2000/09/xmldsig#”>
! </Signature>
! <EncryptedKey xmlns=“http://www.w3.org/2001/04/enc-enc-enc#”>
! </EncryptedKey>
! <wsse:UsernameToken
! ! xmlns=“http://schemas.xmlsoap.org/ws/2003/06/secext”>
! </wsse:UsernameToken>
</wsse:Security>
1. What are coordination controllers? How do they resolve the differences between
the requests from various clients?
Coordination controllers are components that reside in the service provider. Their main
task is to resolve the requests from various clients and thereby to maintain the context for
each client request separately.
They achieve this by creating a separate copy of the WS objects for each request of
each client, thereby maintaining the individuality in request processing.
2. Explain the need for coordination from internal and external service perspectives.
Internal Perspective:
• Complex procedures: Client must be able to execute complex procedures in
appropriate order.
• Maintain the context information: Client must be able to maintain the context
information in order to pass it from one operation to other.
• Complex internal logic: An internal logic of the client is more complex.
External Perspective:
• Order: Ensuring order of operation.
• Conversation: Conversation rather then simple invocation.
Activation: The participant requests the coordinator to create a new coordination context.
Registration: The participant registers itself as a coordination protocol participant with the
coordinator.
Protocol specific interaction: The coordinator and the participant exchange messages
that are protocol specific.
The Atomic Transaction is a protocol that make sure either the entire set of operations
within the transaction completes successfully or the entire transactions is rolled back
as if none of it ever happened.
It can use Durable two-phase commitment or volatile two-phase commitment.
Business activity is a protocol that allows long running transactions to be used without
worrying about locking resources.
In business activity each and every web service call is a complete and independent
transaction that will be committed.
It provides a compensation mechanism through which corrective steps are taken to
rollback a transaction instead of actually rolling back.
• Completeness and dependency: In atomic transaction each and every steps are
executed incrementally and finally the entire transaction is either committed or rolled
back. In BA each and every service call is considered as a transaction and are either
committed or rolled back.
• Resource lock: In atomic transaction, as the resources are utilized until the commit
or rollback is made the resources remain locked. Whereas in BA as each and every
step is a transaction the resources remain unlocked.
• Rollback: Atomic transaction allows the rollback mechanism whereas BA does not
allow roll back. Instead compensation mechanism is executed.
• Instead the commit of AT, BA has complete
• Instead the rollback of AT, BA has compensate
Each coordinator may have different roles: one as participant, other as coordinator. The
participant just forward, when the coordinator may ensure some activation, registration and
so on.
So each coordinator may have two roles, and then we can have such chain of coordinator.
Compensation mechanism is the process in which corrective steps are taken in order to
achieve a roll back effect in case of an aborted transaction.
Coordination context is a data structure used to mark messages belonging to the same
conversation.
V1.0 Last modification: 01/06/2010! Page 34
Programming Web Services! Exam questions & Answers
It contains a unique identifier that will be attached along with each and every message
belonging to the same conversation.
It has the “context identifier” and “expires” components.
<wscoor:CoordinationContext>
! <wsu:Identifier>id2</wsu:Identifier>
! <wsu:Expires>2009-10-20</wsu:Expires>
</wscoor:CoordinationContext>
12. Give a example of WS-Coordination flow between two Web Services when
distributed coordinators are used (you may present the flow graphically)
WS-Coordination defines a coordinator that keeps track of and manages the various
resources (Web Services) involved in multi-party operations.
Lecture 8: WS-Composition
1. What is an abstract process in BPEL? What is its purpose? How it differs from
other processes?
A business protocol specifies the order in which message between partners need to be
exchanged.
An abstract process specifies the business protocol from the perspective of a partnerʼs
internal business process rather than their implementation details.
Its purpose is to just specify the exchange of messages between the partner links and
their potential sequence without any implementation.
In abstract processes the complete implementation details are not available whereas in
executable processes the complete implementation details are available.
2. When and how in BPEL a compensation handler for a give scope in BPEL
becomes active?
A compensation handler becomes active once when the corresponding invoke activity or
scope gets completed successfully.
Correlation set is the combination of two or more keys in order to correlate messages to a
single process instance.
It is useful in situations where the single process has to process multiple similar requests
from various requestors.
For example For the same process instance of process order, if a customer is submitting
another purchase order before the previous purchase order gets processed, then the
customer ID is alone not enough to establish uniqueness.
In such a case we need to have the order ID as well.
If the fault handler throws a fault by itself, then this fault will be caught by the next higher
enclosing scope. This applies to explicitly thrown and unexpected faults in the fault
handler.
PartnerLinkType: Contain one or two roles, which define the responsibilities of each side
of the conversation.
Example:
<plnk:partnerLinkType name=“purchaseOrderPartnerLinkType”>
! <plnk:role name=“seller”>
! ! <plnk:portType name=“pos:poSubmissionPortType”/>
</plnk:role> </plnk:partnerLinkType>
Property: is a named, typed data element and itʼs used to identify BPEL process instance.
The property value is extracted from an instance of a WSDL message by applying a
message-specific XPath expression.
Example:
<wsbp:property name="customerID" type="xsd:ID"/>
PropertyAlias: A propertyAlias defines the relationship between the property and the data
field in the message.
Example:
<wsbp:propertyAlias propertyName="customerID" part="purchaseOrder“
messageType="pos:poSubmissionRequest" query="/billTo/id"/>
10. What are the 2 possible areas where concurrency can be achieved?
V1.0 Last modification: 01/06/2010! Page 38
Programming Web Services! Exam questions & Answers
Flow: Using the fork activity, multiple processes can be executed in parallel.
Event Handler: It can process multiple events of the same type in parallel.
For the dynamic binding of partnerLink, BPEL uses endpoint references. Itʼs defined as a
mechanism to dynamically identify and describe service endpoints and instances.
It contains:
• The address of a service endpoint
• Optional reference properties
• Optional identifications
• Optional policies
Consider a case where a publisher is either not interested or does not have a provision in
keeping track of notification consumers. In such a case, the publisher can register itself to
a notification broker and send in all the notification messages to the broker. Later these
notification messages can be sent to the appropriate consumers.
Notification brokers support the additional operation of RegisterPublisher which allows the
notification publishers to register themselves before publishing any messages to the
broker.
It refers to the mechanism which associates the resources with execution of message
exchanges in Web services.
The conventions allow the state of a resource to be defined and associated with the
description of a web service interface.
The term implied is used because the identity of the resource is implied by the context of
the message and its association with an end point reference and not directly to the
signature of the message.
Resource property represents atomic element of state that can be read and written.
A set of resource property elements are gathered together into a resource property
document.
Reference property is used to access a particular WS-Resource that has particular state
information, which the web service is interested in.
4. What are Ad Hoc topics? How are they implemented? Why should they be used
with caution?
Ad Hoc topics are more specific topics that cannot be categorized under any of the
existing topic spaces.
The properties are:
• Dynamic adding: They are generated and added dynamically.
• Self adding: These Ad Hoc topics will be added in to the Ad Hoc topic space itself.
• child topics: They can contain child topics.
This should be handled with caution because the subscriber does not know beforehand
about it or about the topics mentioned with in it. It should be used only for dynamic topics.
V1.0 Last modification: 01/06/2010! Page 40
Programming Web Services! Exam questions & Answers
It contains
• A transport specific network address of a web service.
• Optionally contain additional metadata about the web service.
URI encoding: In this approach, a specific URI value is attached along with the end point
reference of the web service.
12. How service requestor can examine or interpret the content of “Reference
Properties” elements of a WS-Resource endpoint reference?
It can examine the content of the resource property document using the following resource
properties operations.
14. How can a service requestor compare two stateful resources based on content
of the reference properties? Explain your answer.
They canʼt. The service requestor should not examine or attempt to interpret the contents
of the reference properties.
For service requestor, the content of reference properties is opaque.
The components of a triplet are subject, predicate and object. For example the URI
www.google.com/index.html was created by George can be represented in a triplet as
follows
Subject - www.google.com/index.html
Predicate – created by
Object – George.
An entire triplet forms a resource.
4. Which components constitute the top level service ontology in OWL-S? Which
questions about a service each of them answers?
5. What are the relations between current web, web services, semantic web and
semantic web services technologies?
The current web technology does not allow us to find services dynamically. So, the
usage of web services enables the client applications to find relevant services.
Incorporating semantics in to the web services will enable multiple web services to talk
among themselves and decide on how to achieve the goal of a particular business
process.
6. Show layers and associated web services technologies of semantic web stack.
1. Service location: syntactically different but semantically similar terms can be used
by the service provider and requestor for the same service.
Eg: If a service provider provides a service named Payroll Processing and the service
requestor looks for a service name Employee Payroll Processing then adding semantics
will allow the service requestor to use the Payroll Processing web service.
Eg: Consider the scenario where there are 2 providers offering Payroll Processing service
that takes different input parameters. Then adding semantics to the service descriptions
enables the service requestors to decide on what is the appropriate service to be invoked.
Eg: As in the above example for service invocation, adding semantics to the service result
enables the service requestor to decide on which is the appropriate service to be invoked
to get the desired result.
Eg: Consider a service called Create Applicant Profile that creates a complete profile of a
student/employee by getting his/her information from other web services like that of
university transcript information, work experience information etc. In such a case the
output from multiple web services needs to combined together to produce the applicant
profile. Adding semantics will enable the web services to choose the correct web service to
be invoked for each of the applicant.