Dear Readers, Welcome to SOAP Interview Questions and Answers have been designed specially to get you acquainted with the nature of questions you may encounter during your Job interview for the subject of SOAP. These SOAP Questions are very important for campus placement test and job interviews. As per my experience good interviewers hardly plan to ask any particular questions during your Job interview and these model questions are asked in the online technical test and interview of many IT companies.
SOAP acts as a medium to provide basic messaging framework. On these basic messaging frameworks abstract layers are built. It transfers messages across the board in different protocols; it also acts as a medium to transmit XML based messages over the network.
Consider a real estate database with huge data ranges. If a user wants to search about a particular term, the message with all the required features such as price, availability, place, etc will be returned to the user in an XML formatted document which the user can integrate into third party site for additional performance.
Remote call procedure is considered as a very important function in SOAP. In RCP a user (node) sends a request to another node (server) where the information is processes and sent to the user. It immediately sends message across the network.
Internet application layer is used to transfer messages from one end to another end. Various products have been transported successfully from one end to another end using SOAP. Both SMTP and HTTP are two successful transport protocols used in transmitting information, but HTTP has gained good ground than HTTP.
HTTPS is similar to HTTP but it has an additional layer underneath the internet application layer which makes the data encrypted. This protocol is widely used than IOP or DCOM because those protocols are filtered by firewalls. HTTPS protocol advocates WS-I method to provide security for transmission of secured data.
XML is chosen as a standard format because it was already in use by many large companies and immensely due to its open source nature. A wide variety of tools are available on shelves which ease the process of transition to SOAP. XML can significantly reduce the speed and efficiency but binary XML is being considered as a format for future.
• SOAP by passes all firewalls thus making the process easier.
• It has huge collection of protocols
• It is platform and language independent
• Simplicity and extensible nature makes it the most wanted.
1) SOAP is much slower than middleware technologies
2) Due to the usage of HTTP for transporting messages and not the defined ESB or WS-Addressing interaction of parties over a message is fixed.
3) Information regarding the usability of HTTP for different purposes is not present which makes the application protocol level problematic.
RPC is very friendly in implementing the client to server interaction model which makes it very prominent. When the server is interacting and searching for information the client side messaging is blocked and server activity goes on. RPC has huge pool of protocols which at times make it difficult to work with. Client server interaction can be best achieved by RPC.
An important difference between Remote call procedure and local call is that remote call can fail often and this occurs without the knowledge of the user. Local calls are easily handled. Another main difficulty lies with the code writing capability because it is written in a low level language.
Following elements are contained in the SOAP message.
1) An envelope element which identifies and translates the XML document into a SOAP message.
2) A header element is a must as it should contain header message.
3) A body is required which should contain call and response message.
4) Fault element is required which can communicate about the errors occurred during the process
Some of the important syntax rules are as follows
1) SOAP should be coded in XML
2) SOAP envelope should be used for SOAP message
3) A SOAP encoding namespace must be used by SOAP.
4) A DTD reference and a XML processing instruction should not be contained.
This is used to define the data types in the document. Any SOAP element may use this format and it gets implemented on the child and contents of the SOAP. SOAP element will never have a default encoding.
A SOAP message will have the SOAP element as the root element. SOAP element name space should always have the value of : as that defines the Envelope.
A SOAP message has to travel a very long distance between its client and server but during the process a part of the message may be intended to be deployed to another destination which is made possible by the SOAP elements actor attribute which address the header element to a particular location.
This attribute indicates whether the header is optional or mandatory for the recipient to process. If you add mustUnderstand =”1” to the child element of the header element then it states that the header element must be processed otherwise it leads to failure.
This part of the element will contain the message which is intended for the ultimate delivery point. An element can be described inside the body element as a default namespace which indicates about the error message during the process. SOAP element acts just like a code to be processed during the execution of a certain application.
SOAP uses an XML format to encode data. There are two waysin which it maps high level datatypes like integers, arraysto a serialized XML format- Section 5 encoding and Literalencoding. Section 5 encoding, also called SOAP encoding, isnamed after the section in the SOAP 1.1 specification thatdefines it. Literal encoding on the other hand uses a XML.
In SOAP, procedures take named parameters and order is irrelevant. In XML-RPC order is relevant and parameters do not have names.
we can sent and receive soap msg with the help of HTTP, FTP or SMTP protocols. we need to bind the soap envelope in protocol and then we can send and receive our msg over the netwrok.
This part of the element will contain the message which is intended for the ultimate delivery point. An element can be described inside the body element as a default namespace which indicates about the error message during the process. SOAP element acts just like a code to be processed during the execution of a certain application.
A SOAP message will have the SOAP element as the root element. SOAP element name space should always have the value of : as that defines the Envelope.
Following elements are contained in the SOAP message.
1) An envelope element which identifies and translates the XML document into a SOAP message.
2) A header element is a must as it should contain header message.
3) A body is required which should contain call and response message.
4) Fault element is required which can communicate about the errors occurred during the process
SOAP acts as a medium to provide basic messaging framework. On these basic messaging frameworks abstract layers are built. It transfers messages across the board in different protocols; it also acts as a medium to transmit XML based messages over the network.