Soap Interview Questions and Answers
1) What are webservices?
A web service is a collection of open protocols and standards used for exchanging data between applications or systems. Software applications written in various programming languages and running on various platforms can use web services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer.
2) What is JAX-WS?
JAX-WS (Java API for XML Web Services) is a set of APIs for creating web services in XML format.
3) What is JAXB?
JAXB (Java Architecture for XML Binding) is a Java standard that defines how Java objects are converted from and to XML. It makes reading and writing of XML via Java relatively easy.
4) What is SOAP?
SOAP stands for <strong>Simple Object Access Protocol</strong>. SOAP is an XML based industry standard protocol for designing and developing web services.
5) What are the types of information included in SOAP header?
Header of SOAP contains following information.<br/> <strong>1.</strong> In SOAP header client should handle authentication and transaction.<br/> <strong>2.</strong> The SOAP message should process by client.<br/> <strong>3.</strong> EncodingStyle is also has in header.<br/>
6) Explain the differnece between fault and exception in Apache SOAP?
Difference between the fault and exception depends upon where these error occurs, may be they occur on client side or on server side. Exception occurs on client side where as fault occurs on server side.
7) What are the element that we used in SOAP?
<strong>1.</strong> An envelope element is used to identifies and translates the XML document into a SOAP message.<br/> <strong>2.</strong> A header element is used to contain header message.<br/> <strong>3.</strong> A body is used to contain call and response message.<br/> <strong>4.</strong> Fault element is used to communicate about the errors occurred during the process.
8) How does SOAP work?
SOAP is used to provide a user interface that can be achieved from the client object and the request that it sends goes to the server that can be achieved by using the server object. The user interface creates some files or methods that consists of server object and the name of the interface to the server object. It also consists of other information like name of the interface and method. It uses HTTP to send the XML to the server using the POST method. The server parses the method and send the result to the client side. The server creates more XML that consists of responses of the user interface's request that is used using HTTP. Client can use any method of to send the XML. It can use the SMTP server as well as POP3 protocol to pass the messages and for request or respond queries.
9) Explain about the mustUnderstand Attribute in SOAP?
This attribute indicates whether the header is optional or mandatory for the recipient to process. If you add <strong>mustUnderstand ="1" </strong>to the child element of the header element then it states that the header element must be processed otherwise it leads to failure.
10) 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.
11) What are the elements which should be contained in SOAP message?
Following elements are contained in the SOAP message.<br/> <strong>1.</strong> An envelope element which identifies and translates the XML document into a SOAP message.<br/> <strong>2.</strong> A header element is a must as it should contain header message.<br/> <strong>3.</strong> A body is required which should contain call and response message.<br/> <strong>4.</strong> Fault element is required which can communicate about the errors occurred during the process.<br/>
12) Explain the difference between RPC and Local calls in SOAP?
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.
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 actor element in SOAP?
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.
15) 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.
16) How is SOAP different from traditional RPC?
In SOAP, procedures take named parameters and order is irrelevant. In XML-RPC order is relevant and parameters do not have names.
17) 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.
18) What are the advantages which a user can get when he uses SOAP?
SOAP by passes all firewalls thus making the process easier.<br/> <strong>1.</strong>It has huge collection of protocols<br/> <strong>2</strong>It is platform and language independent<br/> <strong>3.</strong>Simplicity and extensible nature makes it the most wanted.
19) State some disadvantages due to the usage of SOAP?
<strong>1.</strong>SOAP is much slower than middleware technologies<br/> <strong>2.</strong>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.<br/> <strong>3.</strong> Information regarding the usability of HTTP for different purposes is not present which makes the application protocol level problematic.
20) Explain about the syntax rules in SOAP?
<strong>1.</strong>SOAP should be coded in XML<br/> <strong>2.</strong>SOAP envelope should be used for SOAP message<br/> <strong>3.</strong>A SOAP encoding namespace must be used by SOAP.<br/> <strong>4.</strong>A DTD reference and a XML processing instruction should not be contained.
21) What are the advantages of SOAP?
<strong>1.</strong>SOAP has huge collection of protocols<br/> <strong>2.</strong>SOAP is an platform and independent.<br/> <strong>3.</strong>SOAP is an language independent.<br/> <strong>4.</strong>Most important feature of SOAP is that it has Simple and extensible by nature.
22) What is WSDL in SOAP?
WSDL stands for Web Services Description Language. It is a xml document containing information about web services such as method name, method parameter etc.
23) What is UDDI?
UDDI stands for Universal Description, Discovery and Integration. It is a XML based framework for describing, discovering and integrating web services. It contains a list of available web services. WSDL is the part of UDDI.
24) What is structure of WSDL document?
A WSDL document describes web-service using below elements: <br/> <strong>WSDL 1.1 :</strong> types, messages, portType(operation - input, output), binding, service(port). <br/> <strong>WSDL 2.0 :</strong> types, interface(operation - input, output), binding, service(endpoint). <br/> Its easy to remember these elements with an analogy to java class: <br/> <strong>portType </strong>is equivalent to name of class.<br/> Each operation in <strong>portyType</strong> gives name of a method in the class. <br/> The input and output tags inside operation corresponds to input parameter and return value. <br/> <strong>types and messages </strong>define structure of these input, output in xml.<br/> <strong>service element </strong>provides url where the web-service is hosted.
25) What are the approaches to write web services?
<strong>Top-down</strong> development or contract (WSDL) first approach.<br/> <strong>Bottom-up</strong> development or code first approach.
26) What is Apache Axis?
Apache Axis is a web services framework which provides implementation of JAX-RPC(Axis 1.x) and JAX-WS(Axis 2) web services specifications.
27) What is apache CXF?
Apache CXF is a web services framework which provides implementation of JAX-WS and JAX-RS web services specifications.
28) What do you mean by ESB?
ESB is stands for <strong>Enterprise Service Bus</strong>. ESB is standard based which is most important component of Service Oriented Architecture(SOA).Using ESB we can connect applications through service interfaces.
29) What is the function of SMON?
The SMON background process performs all system monitoring functions on the oracle database.<br/> 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.<br/> SMON performs periodic cleanup of temporary segments that are no longer needed.
30) 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. <br/>Each application uses different technology. This may cause problems with proxy server and firewalls. SOAP is the solution for this situation.<br/> 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.
31) What are the steps taken in SOAP processing model?
SOAP stands for Simple object access protocol and it describes the distributed processing model. There are different nodes are used and they are termed as SOAP nodes. These acts as a receiver of the processes and allows the access to the messages as well. <br/>The nodes consists of the following process:<br/> <strong>1.</strong> SOAP sender : It is a node that transmits the message received by the receiver.<br/> <strong>2.</strong> SOAP receiver : It is a node that receives or accepts the message passed by the user.<br/> <strong>3.</strong> SOAP message path : Is a node that sets the path to make it easy for the messages to go along and reach its destination.<br/> <strong>4.</strong>Initial SOAP sender : Is also called as originator and it sends the message at the starting point of the message path and saves the settings there.<br/> <strong>5.</strong> SOAP intermediary : Is a in between the SOAP receiver and SOAP sender that contains the SOAP message. It processes the header blocks that forward the SOAP message to the receiver.<br/> <strong>6.</strong>Ultimate SOAP receiver : Is the node where the message gets received finally. This is responsible for the processing of the contents used by the SOAP body and the SOAP header also included in it.
32) What are the steps involved in doing the data exchange between the client and the server?
The data that is exchanged between the client and server is in XML format and the SOAP passes the object between its methods and the object of the type parameter. SOAP deploys the service that is supplied in the Deployment management area and it is also an administrative tool. It keeps all the information about the services that are running on the web server. This is necessary to be done to keep the routing of the calls to identify the resource uniquely by using different parameters like different names and types. It is used to deploy the services for the client that sends the requests. Un-deploy or remove the services that are already deployed. Show the list of all the services that are deployed on the server and taking necessary actions on them.
33) What are the tools to test web-service?
<strong>1.SoapUI</strong> is the world leading tool for testing SOAP based web services, latest version support REST as well. <strong>2. Firefox poster plugin</strong>