SOAP Interview Questions

Started by nithyasubramanian, Jan 15, 2009, 11:16 AM

Previous topic - Next topic

nithyasubramanian

SOAP Interview Questions

1)   Explain about SOAP?
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.

2)   Give an example about the functioning of SOAP?
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.

3)   Explain about Remote call procedure?
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.

4)   Explain about Transport methods in SOAP?
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.

5)   Explain about HTTPS in SOAP?
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.

6)   Explain about the role of XML in SOAP?
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.

7)   What are the advantages which a user can get when he uses SOAP?
•   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.

8)   State some disadvantages due to the usage of SOAP?
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.

9)   Explain about message passing in RPC?
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.

10)    Explain the difference between RPC and Local calls?
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.

11)    What are the elements which should be contained in SOAP message?
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

12)    Explain about the syntax rules in SOAP?
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.

13)    Explain about the encoding style attribute?
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.

14)    Explain about the SOAP Envelope element?
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.

15)    Explain about the actor element?
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.

16)    Explain about the mustUnderstand Attribute?
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.

17)    Explain about the SOAP body element?
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.
Thanks and Regards
- Nithya Subramanian
Kenvivo Communications
http://nithya-subramanian.blogspot.com/

kavee

Question 1: what type of basic questions they are asked in Webservices?
 
Answer  1:basic web service questions include:
1)what do you mean by a Web service? what is the advantage
of using a Web service?

2)what is an WSDL?Specifications ?How are they generated?
How do you generate proxies from a WSDL?

3)what is an UDDI? Who takes care of registering
services ,modifying and deleting them?
   
 
 
Answer1:  the term Web Services refers to the technologies that allow
for making connections. Services are what you connect
together using Web Services. A service is the endpoint of a
connection. Also, a service has some type of underlying
computer system that supports the connection offered. The
combination of services - internal and external to an
organization - make up a service-oriented architecture
 
 
 
Answer 2 Basic question related to webservices
SOA
SOAP
WSDL
Service Provider
Service Consumer
XML
UDDI
CORBA/RMI

These are basic step for web services
   
 
 


   
Question :4 What is SOAP and why it is required ?
 
Answer 4: SOAP stands for simple object Access protocol .

SOAP structures a message into two main parts: the headers
and the body.
SOAP is more than just a sender-receiver protocol, although
that, too, is certainly the dominant use today. SOAP
supports the concept of a message passing from a recipient,
possibly through one or more intermediaries, and ending up
at its destination, more precisely known as the ultimate
receiver.
   
 
 
Answer::  SOAP is core part of WEB-SERVICE. Mainly SOAP is an XML
syntax for exchanging message because of XML is language and
platform
indepent.SOAP is use when we are creating web services
because  Web services means publish a method(method resolve
business logic) globally.

Answer  Simple object access protocal
 
 
 
Question5:  About how soap messages are sent and received in web service ?

Answer5:  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
netwok.
   
 
 
Question6 : How to use SOAP-DSIG and SSL for non-repudiation?

Answer 6: SOAP-DSIG is used to satisfy the message authentication
requirement. It is important to note that you can use SOAP-
DSIG and SSL simultaneously by exchanging


    the above HTTP messages over SSL.     





Technology Satisfied security requirements
SSL Confidentiality, sender/recipient authentication, and
message authentication by MAC
SOAP-DSIG Message authentication by digital signature and
MAC


        SSL provides confidentiality and sender/recipient
authentication. SSL also has functionality for adding MACs
to transmitted messages. On the other hand,


SOAP-DSIG can be used to add not only MACs but also digital
signatures to transmitted messages, but it is not
sufficient for sender/recipient authentication


because it is vulnerable to attacks such as replay attacks.
Therefore, SOAP-DSIG and SSL complement the functionalities
that the other system lacks.

         

         Remember that in order to satisfy the requirement
of non-repudiation, at a minimum you need to simultaneously
guarantee both message authentication by using a

        digital signature and sender authentication.
Therefore, using SOAP-DSIG and SSL (with client
authentication) simultaneously is the first step towards
realizing non-        repudiation. Specifically, you use
SOAP-DSIG for message authentication by using a digital
signature and SSL client/server authentication for
sender/recipient authentication.
   

 
 
Question 7:: What software elements must be assembled to build a SOAP
Server?

Answer 7::; At a minimum, all you really need is an XML processor and
an HTTP server.If you're using Visual Basic 6.0 or VBA,
then you probably want to use either Microsoft SOAP Toolkit
or PocketSOAP. If you're using VB.NET or C#, then you       
probably want to use Visual Studio.NET or the .NET
Framework. If you're using Delphi, then you want to use
Borland's Web services support in Delphi. If you're       
using C++, then you probably want to use Systinet WASP
Server for C++ or gSOAP. If you're using Java, then you
have a choice of about a dozen     implementations (Apache
Axis, Systinet WASP Server for Java, The Mind Electric
GLUE, Cape Clear Cape Connect, IONA XMLBus, BEA Workshop,
etc.)



            Favorite Java environments are WASP, GLUE, and
Axis. All offer excellent tools, they're portable across a
wide range of servlet engines, and they work!WASP and GLUE
can run standalone.
 

 
 
Question 8: What is the difference between a fault and exception in
Apache SOAP?

Answer8:::  The difference lies in where the error occurs - on the
client side (during the generation of the soap request or
the unmarshalling the response) - or on the server side
(when unmarshalling the request, processing the message or
marshalling the response). The client side raises an
exception  whereas the server side sends a SOAP response to
the client indicating an error occured on the server side
(ie. you get a SOAP fault).

        For example, sending a SOAP encoded request for a
method that does not exist results in a SOAP fault whereas
if the server sends a response with a field that does not
exist in a client side class a SOAP exception will be
raised.
   

 
 
Question  9How is SOAP different from traditional RPC?

Answe9r::  In SOAP, procedures take named parameters and order is
irrelevant. In XML-RPC order is relevant and parameters do
not have names.
   

 
 
Question  10:What is SOAP Version 1.2?

Answer10 :: SOAP version 1.2 is a lightweight protocol for exchange of
information in a decentralized, distributed environment. It
is an XML based protocol that consists of four parts: an
envelope that defines a framework for describing what is in
a message and how to process it, a set of encoding rules
for expressing instances of application-defined data types,
a convention for representing remote procedure calls and
responses and a binding convention for exchanging messages
using an underlying protocol. SOAP can potentially be used
in combination with a variety of other protocols; however,
the only bindings defined in this document describe how to
use SOAP in combination with HTTP and the experimental HTTP
Extension Framework.
   

 
 
Question  11What is an ESB?

 
Answer11::  An Enterprise Service Bus (ESB) is a standards-based,
Service Oriented Architecture (SOA) backbone, capable of
connecting applications through service interfaces. By
combining Messaging, Web Services, XML, Data Transformation
and Management, an ESB can reliably connect, mediate and
control all communications and interactions between
services.
 

 
 
Answer:  An esb is a very important component of SOA. Imagine all
your web services built on different technologies
(java,.net,mainframe)..interacting with each other using
xml for data transmission..One doesn't have to worry about
the schema transformation,protocol switching or message
enrichment..the esb does it all for you ..
 
 
Question 12 What is loosely coupled?

Answer12::  it basically means that the services that you use are
reusable.One service does not depend upon the other.A
change in a .net service shall not affect another service
developed in java.All the components that is needed for an
application must not be tightly coupled so that a single
change in some class changes all other parts of the
application.Instead break the whole application into small
components ,expose them as web services and orchestrate .
   
 
 
Question 13: What do you mean by SOAP encoding?
 
Answer 13: A.SOAP uses an XML format to encode data. There are two ways
in which it maps high level datatypes like integers, arrays
to a serialized XML format- Section 5 encoding and Literal
encoding. Section 5 encoding, also called SOAP encoding, is
named after the section in the SOAP 1.1 specification that
defines it. Literal encoding on the other hand uses a XML