Friday 25 January 2013

SOAP Interview Que & Answ's



Q.What is SOAP?
A.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.Two components can easily communicate using Remote Procedure Calls protocol. But because of their compatibility and security issues, most of firewalls and proxy server block this type of messages. SOAP uses HTTP channel to transport which makes it widely accepted protocal over the internet.
Q.Explain the purpose of SOAP?
A.Simple Object Access Protocol is a XML based protocol that enables application to communicate with each other. SOAP has a standard format for sending messages. SOAP allows applications to communicate with each other over http, when different application running on different types of operating systems and using different technologies; SOAP can be used to enable communication between them.
Q.Give examples where SOAP is used.?
A.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.
SOAP request

<soap:envelope
xmlns:soap=http://www.w3.org/2001/12/soap-envelope
soap:encodingStyle="
http://www.w3.org/2001/12/soap-encoding">
http://www.example.org/ company ">

1234>
</soap:envelope
SOAP response
<soap:envelope
xmlns:soap=http://www.w3.org/2001/12/soap-envelope
soap:encodingStyle="
http://www.w3.org/2001/12/soap-encoding">
http://www.example.org/company">
ABC
20000
</soap:envelope

Q.What are Transport methods in SOAP?
A.HTTP – The most common and preferred method of transport. HTTP is simple and universally accepted. The mechanism for sending a SOAP message over HTTP is the standard HTTP POST method. An HTTP POST sends a block of data to a particular URI on the web server.SMTP is also used as a transport medium. 
HTTPS may also be used for a secured communication.
Q.Explain the role of XML in SOAP.
A.XML is used as a message format to communicate. Due to the open source nature of XML, it is widely accepted.
Q.What are the elements that should be contained in SOAP message?
A.
1.Envelope – Translates the XML document to a SOAP message. It is the root element. 
2.Header – Contains the header message. Contains the application specific information. 
3.Body – Contains the call and response message. 
4.Fault element – Used for communicating errors. If present, it appears as a child element of the body and can appear only once.
Q.What is SOAP Envelope element?
A.SOAP envelope element is the root element used to define the XML document as a SOAP message.
Example:
http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
...
Message information goes here
...
Q.What is SOAP actor element?
A.The header element may pass through different endpoints before it reaches the receiver. SOAP actor element is specifically used to address the header element to a specific endpoint.Syntax:
Soap:actor=”URL”
Q.What is SOAP body element?
A.SOAP body element is used to enclose the actual message. It is a required element that is enclosed within the Envelope tag.
Example - Request
http://www.w3schools.com/company ">
Apple
Q.What do you mean by SOAP encoding?
A. A SOAP message has no default encoding. Hence, in order to define data types used in the document encodingStyle attribute is used. It can appear in any SOAP element.Syntax:
soap:encodingStyle="URI"
Q.Why Encrypt SOAP messages?
A.The main purpose of SOAP is to exchange messages over HTTP. For communication it uses XML. The messages exchanged if done in plain text can be potentially viewed by anyone across the internet. SOAP over HTTPS is secured. The entire HTTP message, including both the headers and the body of the HTTP message is encrypted using public asymmetric encryption algorithms.
Q.Explain in brief about the term CSS.     
A.A stylesheet language used to describe the presentation of a document written in a markup language. Cascading Style Sheets are a big breakthrough in Web design because they allow developers to control the style and layout of multiple Web pages all at once.
Q.What are the various style sheets?  
A.Inline, external, imported and embedded are the different types of style sheets.
Q.What are style sheet properties?   
A.The different style sheet properties are:
1.CSS Background
2.CSS Text
3.CSS Font
4.CSS Border
5.CSS Outline
6.CSS Margin
7.CSS Padding
8.CSS List
9.CSS Table
Q.List various font attributes used in style sheet.       
A.The various font attributes are:
1.font-style
2.font-variant
3.font-weight
4.font-size/line-height
5.font-family
6.caption
7.icon
8.menu
9.message-box
10.small-caption
11.status-bar
Q.Explain inline, embedded and external style sheets.  
A.
1.Inline 
If only a small piece of code has to be styled then inline style sheets can be used.
2.Embedded 
Embedded style sheets are put between the tags.
3.External
If you want to apply a style to all the pages within your website by changing just one style sheet, then external style sheets can be used.

No comments:

Post a Comment