All interview topics
System Design & Architecture

SOA Interview Questions and Answers

Practice SOA interview questions and answers organized by difficulty, with revealable explanations and related topics.

21 questionsEntry → Expert

Junior questions

3 questions
  1. Question 1
    Junior

    What is SOAP?

    • SOA API Design
    Reveal answer

    SOAP stands for Simple Object Access Protocol. SOAP is an XML based industry standard protocol for designing and developing web services. Since it’s XML based, it’s platform and language independent. So our server can be based on JAVA and client can be on .NET, PHP etc. and vice versa.

  2. Question 2
    Junior

    What is WSDL?

    • SOA
    Reveal answer

    WSDL stands for Web Service Description Language. WSDL is an XML based document that provides technical details about the web service. Some of the useful information in WSDL document are: method name, port types, service end point, binding, method parameters etc.

  3. Question 3
    Junior

    Define what is SOA

    • SOA API Design
    Reveal answer

    A Service Oriented Architecture (SOA) is basically defined as an architectural pattern consisting of services. Here application components provide services to the other components using communication protocol over the network. This communication involves data exchanging or some coordination activity between services. Some of the key principles on which SOA is based are mentioned below The service contract should be standardized containing all the description of the services. There is loose coupling defining the less dependency between the web services and the client. It should follow Service Abstraction rule, which says the service should not expose the way functionality has been executed to the client application. Services should be reusable in order to work with various application types. Services should be stateless having the feature of discoverability. Services break big problems into little problems and allow diverse subscribers to use the services.

Expert questions

2 questions
  1. Question 1
    Expert

    Name the main differences between SOA and Microservices?

    • Microservices SOA
    Reveal answer

    SOA uses Enterprise Service Bus for communication whereas microservices use much simpler messaging systems. Each microservice stores data independently while in SOA components share the same storage. For microservices, it’s typical to use Cloud while for SOA Application Servers are much more common. SOA is still a monolith, in order to make changes, you need to change the entire architecture. SOA using only heavy-weight technologies and protocols (like SOAP, etc) whereas microservices is the leaner, meaner, more agile approach (REST/GraphQL).

  2. Question 20
    Expert

    Is binding between SOAP and WSDL possible?

    • SOA
    Reveal answer

    Yes, it is possible to bind WSDL to SOAP. The binding is possible by basically two attributes Name: Defines the name of the binding. Type: Defines the port for the binding. For SOAP binding, two attributes need to be declared Transport: Defines the SOAP protocol to be used i.e. HTTP. Style: This attribute can be ‘rpc’ or ‘document’.

Mid questions

7 questions
  1. Question 4
    Mid

    What are advantages of SOAP Web Services?

    • SOA
    Reveal answer

    SOAP web services have all the advantages that web services has, some of the additional advantages are: WSDL document provides contract and technical details of the web services for client applications without exposing the underlying implementation technologies. SOAP uses XML data for payload as well as contract, so it can be easily read by any technology. SOAP protocol is universally accepted, so it's an industry standard approach with many easily available open source implementations.

  2. Question 5
    Mid

    What is the difference between Monolithic, SOA and Microservices Architecture?

    • Microservices Software Architecture SOA
    Reveal answer

    Monolithic Architecture is similar to a big container wherein all the software components of an application are assembled together and tightly packaged. A Service-Oriented Architecture is a collection of services which communicate with each other. The communication can involve either simple data passing or it could involve two or more services coordinating some activity. Microservice Architecture is an architectural style that structures an application as a collection of small autonomous services, modeled around a business domain.

  3. Question 6
    Mid

    What are the various approaches available for developing SOAP based web services?

    • SOA
    Reveal answer

    There are basically 2 different approaches available for developing SOAP-based web services. These are explained as follows Contract-first approach: In this approach, the contract is defined first by XML and WSDL and then java classes are derived from the contract. Contract-last approach: In this approach, java classes are defined first and then the contract is generated which is usually the WSDL file from the java class. “Contract-first” method is the most preferred approach.

  4. Question 7
    Mid

    Explain WSDL?

    • SOA
    Reveal answer

    WSDL stands for Web service Description Language. It is a simple XML document which comes under the Service Description layer of Web Service Protocol Stock and describes the technical details or locates the user interface to web service. Few of the important information present in WSDL document are

    Method name Port types Service end point Method parameters Header information Origin, etc

  5. Question 8
    Mid

    How would you choose between SOAP and REST web services?

    • SOA API Design
    Reveal answer

    Web Services work on client-server model and when it comes to choose between SOAP and REST, it all depends on project requirements. Let’s look at some of the conditions affecting our choice: Do you know your web service clients beforehand? If Yes, then you can define a contract before implementation and SOAP seems better choice. But if you don’t then REST seems better choice because you can provide sample request/response and test cases easily for client applications to use later on. How much time you have? For quick implementation REST is the best choice. You can create web service easily, test it through browser/curl and get ready for your clients. What kind of data format are supported? If only XML then you can go with SOAP but if you think about supporting JSON also in future then go with REST.

  6. Question 9
    Mid

    What is UDDI?

    • SOA API Design
    Reveal answer

    UDDI is acronym for Universal Description, Discovery and Integration. UDDI is a directory of web services where client applications can lookup for web services. Web Services can register to the UDDI server and make them available to client applications.

  7. Question 10
    Mid

    What are disadvantages of SOAP Web Services?

    • SOA API Design
    Reveal answer

    Some of the disadvantages of SOAP protocol are: Only XML can be used, JSON and other lightweight formats are not supported. SOAP is based on the contract, so there is a tight coupling between client and server applications. SOAP is slow because payload is large for a simple string message, since it uses XML format. Anytime there is change in the server side contract, client stub classes need to be generated again. Can’t be tested easily in browser

Senior questions

9 questions
  1. Question 11
    Senior

    What is difference between SOA and Web Services?

    • SOA API Design
    Reveal answer

    Service Oriented Architecture (SOA) is an architectural pattern where applications are designed in terms of services that can be accessed through communication protocol over network. SOA is a design pattern and doesn’t go into implementation. Web Services can be thought of as Services in SOAP architecture and providing means to implement SOA pattern.

  2. Question 12
    Senior

    What are the two attributes of element in WSDL?

    • SOA
    Reveal answer

    Every port element is related to a specific binding by defining an individual endpoint. The port element has following two attributes Name: This attribute provides the unique name within the WSDL document. Binding: This attribute refers to the process of binding which has to be performed as per the linking rules defined by WSDL.

  3. Question 13
    Senior

    Enlist the operation types response used in WSDL?

    • SOA
    Reveal answer

    WSDL basically defines 4 types of Operation type responses. These are enlisted below One-way: Receives a message but does not return response. Request-Response: Receives a request and return a response. Solicit-Response: Sends a request and wait for a response. Notification: Sends a message but does not wait for a response. Among these, Request-Response is the most common operation type.

  4. Question 14
    Senior

    Explain the message element in WSDL?

    • SOA
    Reveal answer

    Message element describes the data that has been exchanged between the consumer and the web service providers. Every web service consists of two messages and each message has zero or more parameters. The two messages are Input: Describes the parameter for the web service Output: Describes the return data from the web service.

  5. Question 15
    Senior

    What are the different elements of WSDL documents?

    • SOA
    Reveal answer

    The different elements of WSDL document along with brief description is enlisted below Types: This defines the message data types, which are in the form of XML schema, used by the web services. Message: This defines the data elements for each operation where messages could be the entire document or an argument that is to be mapped. Port Type: There are multiple services present in WSDL. Port type defines the collection of operations that can be performed for binding. Binding: Determines and defines the protocol and data format for each port type. Operations: This defines the operations performed for a message to process the message.

  6. Question 16
    Senior

    What is difference between Top Down and Bottom Up approach in SOAP Web Services?

    • SOA
    Reveal answer

    In Top Down approach first WSDL document is created to establish the contract between web service and client and then code is written, it’s also termed as contract first approach. This is hard to implement because classes need to be written to confirm the contract established in WSDL. Benefit of this approach is that both client and server code can be written in parallel. In Bottom Up approach, first web service code is written and then WSDL is generated. It’s also termed as contract last approach. This approach is easy to implement because WSDL is generated based on code. In this approach client code have to wait for WSDL from server side to start their work.

  7. Question 17
    Senior

    What are the elements of a SOAP message?

    • SOA
    Reveal answer

    SOAP is just like other XML document and has following elements Envelope: This element is defined as the mandatory root element. It translates the XML document and determines the start and end of the SOAP message. Header: This element contains the optional header attributes of the message that contains specific information of the application. This element can occur multiple times and are intended to add new features and functionalities. Body: This element is mandatory and contains the call and response messages. It is also defined as the child element of the envelope containing all the application derived XML data that has been exchanged as a part of SOAP message. Fault element: Errors that occur during processing of the messages are handled by the fault element. If the error is present, then this element appears as a child element of the body. However, there can only be one fault block.

  8. Question 18
    Senior

    What are the important characteristics of SOAP envelope element?

    • SOA
    Reveal answer

    SOAP envelope is a packaging mechanism. Every SOAP message has a mandatory root envelope message. Only one body element is allowed for each envelope element. As the SOAP version changes, envelope changes. If the header element is present, it should appear as the first child. Prefix ENV and envelope element is used for specification. A namespace and an optional encoding style are used in case of optional SOAP encoding.

  9. Question 19
    Senior

    What are different components of WSDL?

    • SOA
    Reveal answer

    Some of the different tags in WSDL xml are: xsd:import namespace and schemaLocation : provides WSDL URL and unique namespace for web service. message : for method arguments part : for method argument name and type portType : service name, there can be multiple services in a wsdl document. operation : contains method name soap:address for endpoint URL.