SOAP WSDL ReadingMaterial25
SOAP WSDL ReadingMaterial25
1. What is SOAP?
o SOAP is a protocol used for exchanging structured information in a platform-independent
and language-neutral way. It uses XML to define the message format.
2. What is WSDL?
o WSDL is an XML-based language used for describing the functionality offered by a web
service. It defines the service interface, operations, and data types.
3. How does SOAP work?
o SOAP works by sending XML-based messages over a transport protocol (usually HTTP or
SMTP). It consists of:
Envelope: Defines the message structure.
Header: Contains optional metadata.
Body: Contains the actual message payload.
Fault: For error handling.
4. Explain the relationship between SOAP and WSDL.
o WSDL describes the structure of a web service, including its operations and message formats.
SOAP provides the protocol for exchanging messages defined by the WSDL.
22. What is the difference between RPC-style and Document-style SOAP web services?
o Answer:
RPC-style:
1. Represents remote procedure calls.
2. Parameters and return values are explicitly defined.
3. More tightly coupled.
Document-style:
1. Represents loosely coupled message exchanges.
2. Uses XML documents to represent data.
3. More flexible and widely used in modern SOAP services.
25. What are SOAP intermediaries, and how are they used?
o Answer: SOAP intermediaries are nodes that process SOAP messages as they travel from
sender to receiver. They can perform tasks like:
Logging.
Authentication.
Message transformation.
Practical Task
Write a SOAP request to invoke a "getUserDetails" operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:web="http://example.com/webservices">
<soapenv:Header/>
<soapenv:Body>
<web:getUserDetails>
<web:userId>12345</web:userId>
</web:getUserDetails>
</soapenv:Body>
</soapenv:Envelope>