wsj_10_mark[1]
wsj_10_mark[1]
The architecture of web service consists of three roles and the interaction consists of
three operations. With a neat diagram explain the idea of web services and interactions with
a suitable example for the data and controlflow.
ANSThe architecture of web service interacts among three roles: service provider, service
requester, and service registry. The interaction involves the three operations: publish, find,
and bind.
o Service Provider o
Service Requestor o
Service Registry
Service Provider
Service Requestor
Service requestor is the application that is looking for and invoking or initiating an
interaction with a service. The browser plays the requester role, driven by a consumer
or a program without a user interface.
Service Registry
Service requestors find service and obtain binding information for services during
development.
o Publish o
Find o Bind
Find: In the find operation, the service requestor retrieves the service description directly. It
can be involved in two different lifecycle phases for the service requestor:
Bind: In the bind operation, the service requestor invokes or initiates an interaction with the
service at runtime using the binding details in the service description to locate, contact, and
invoke the service.
Q2. Explain the essential roles and interactions of web service. Your answer must support
with a neat diagram and suitable real-world applications.
ANS
o Service Provider o
Service Requestor o
Service Registry
Service Provider
Service Requestor
Service requestor is the application that is looking for and invoking or initiating an
interaction with a service. The browser plays the requester role, driven by a consumer
or a program without a user interface.
Service Registry
Service requestors find service and obtain binding information for services during
development.
o Publish o
Find o Bind
Find: In the find operation, the service requestor retrieves the service description directly. It
can be involved in two different lifecycle phases for the service requestor:
Bind: In the bind operation, the service requestor invokes or initiates an interaction with the
service at runtime using the binding details in the service description to locate, contact, and
invoke the service.
In an online travel booking system, multiple web services are often involved:
• Flight Booking Service: Provides available flights, pricing, and booking op ons.
• Hotel Booking Service: Provides informa on about available hotels, pricing, and
booking op ons.
• Car Rental Service: Offers car rental op ons, pricing, and booking.
Workflow:
1. The travel booking applica on (Service Consumer) finds and binds to the flight
booking service (Service Provider) to get available flights.
2. It then binds to the hotel booking service to get hotel op ons based on the user's des
na on and travel dates.
3. Finally, it binds to the car rental service to provide rental op ons to the user.
These interactions enable the travel booking application to offer a comprehensive travel
package to the user by combining data from various service providers.
This interconnected network of web services makes modern applications more modular,
scalable, and interoperable, allowing them to deliver complex functionalities seamlessly.
Q3. Interpret atleastfour major design challenges of distributed systems. Your answer
should not focus on theoretical aspects / hypothetical aspects.
ANS
Q4. One of your colleague, always states “creating a distributed system is not simple,
and there are a number of design considerations to take into account”.What could be
the reasons behind his statement..? Interpret some of the major design issues of
distributed systems, tosupport his statement.
ANS SAME AS 3
Q5. Distinguish SOAP message with attachments and without attachments with neat
diagrams for the both.
Structure of a SOAP Message without Attachments:
1. Envelope: The root element that defines the XML document as a SOAP
message.
2. Header: An optional element that contains application-specific
information like authentication, transaction management, etc.
3. Body: The main content of the message, containing the actual data being
exchanged.
Diagram:
A SOAP message with attachments (SwA) extends the basic SOAP message to include
binary data or large files as attachments. This is useful for scenarios like sending images,
PDFs, or any other binary content along with the SOAP message.
1. Envelope: The root element that defines the XML document as a SOAP message.
2. Header: An op onal element that contains applica on-specific informa on.
3. Body: The main content of the message, which includes references to a achments.
4. A achments: Binary data or files a ached to the message.
Diagram:
Summary of Differences:
• Without Attachments:
o Simpler structure.
o Contains only the SOAP envelope with op onal headers and a mandatory
body.
o Suitable for exchanging XML data.
• With Attachments:
o More complex structure. o Contains a SOAP envelope and addi onal
binary a achments. o Uses MIME to handle a achments. o Suitable for
exchanging large files or binary data along with XML data.
Q7. Examine the necessity of message with a achments and without a achments. Highlight
the differences between them with neat a diagrams and code snippet for the both.
<soapenv:Header/>
<soapenv:Body>
<wea:GetWeather>
<wea:CityName>New York</wea:CityName>
</wea:GetWeather>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Header/>
<soapenv:Body>
<doc:UploadDocument>
<doc:DocumentName>example.pdf</doc:DocumentName>
</doc:UploadDocument>
</soapenv:Body>
</soapenv:Envelope>