SOAP interview questions
What is SOAP?
SOAP, Simple Object Access Protocol is a communication protocol, a way to structure data before transmitting it, is based on XML standard. It is developed to allow communication between applications of different platforms and programming languages via internet.
It can use range of protocols such as HTTP, FTP, SMTP, Post office protocal 3(POP3) to carry documents.
Http-Get, Http-Post works with name/value pair which means transferring complex object is not possible with these protocols, whereas SOAP serializes complex structure, such as ASP.NET DataSets, complex arrays, custom types and XML nodes before transmitting and thus allows exchange of complex objects between applications.
What is SOAP? Explain its purpose.
SOAP is the acronym for Simple Object Access Protocol. XML based messages over a network of computers are exchanged by using SOAP standard, using HTTP.
A web service needs a combination of XML, HTTP and a protocol which is application-specific. A web service uses XML data for exchanging. The weather service, stock quote service, look up service of postal department are all sending XML messages and receiving an XML reply. This is the pattern that dominates the web services. To perform these web services, SOAP is the reliable protocol.
What is the function of SMON?
The SMON background process performs all system monitoring functions on the oracle database.
Each time oracle is re-started, SMON performs a warm start and makes sure that the transactions that were left incomplete at the last shut down are recovered.
SMON performs periodic cleanup of temporary segments that are no longer needed.
Give examples where SOAP is used.
Remote methods over multiple platforms and technologies are used with HTTP. SOAP is XML based protocol and platform-agnostic. Each application uses different technology. This may cause problems with proxy server and firewalls. SOAP is the solution for this situation.
Industries transport the request for finding best route and best cost price. So the application transfers a request to other similar services which uses SOAP.
What are transport methods in SOAP?
Application layer and transport layers of a network are used by SOAP. SMTP and HTTP are the valid application layer protocol uses as transport for SOAP. Wider acceptance is gained by HTTP, as it works better with the current internet infrastructure, especially with firewalls.
Different application running on different types of operating systems and using different technologies.
Example: To find company details, a SOAP request GetCompanyDetail() is sent to the server with the company id as the parameter. In response, details of company are returned via XML.
<?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/ company "> <m: GetCompanyDetail > <m:CompanyID>1234></m:CompanyID > </m: GetCompanyDetail > </soap:Body> <soap:Envelope> <h5>SOAP response</h5> <?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/company"> <m: GetCompanyDetailResponse> <m:name>ABC</m:name> <m:revenue>20000</m:revenue> </m: GetCompanyDetailResponse > </soap:Body> </soap:Envelope>