Showing posts with label soa interview. Show all posts
Showing posts with label soa interview. Show all posts

Saturday 20 February 2016

SOA Interview Questions : Service Oriented Architecture Interview Questions Part 3


What is WSDL ?

The Web Services Description Language (WSDL) is an XML-based interface definition language that is used for describing the functionality offered by a web service. The WSDL provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns.


Can you write a sample WSDL ?

<?xml version="1.0" encoding="UTF-8" ?>
<definitions targetNamespace="tns:https://www.DemoService.test" xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:tns="tns:https://www.DemoService.test" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
             xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

<!-- Abstract type -->
  <types>
    <xsd:schema targetNamespace="tns:https://www.DemoService.test/types" elementFormDefault="qualified"/>
  </types>

<!-- Abstract Message -->
  <message name="NewMessage">
    <part name="in" element="xsd:any"/>
  </message>
  <message name="NewReturnMessage">
    <part name="return" element="xsd:any"/>
  </message>

<!-- Abstract Port Type -->
  <portType name="DemoServicePortType">
    <operation name="NewOperation">
      <input message="tns:NewMessage"/>
      <output message="tns:NewReturnMessage"/>
    </operation>
  </portType>

<!-- Concrete Binding with SOAP-->
  <binding name="DemoServiceBinding" type="tns:DemoServicePortType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="NewOperation">
      <soap:operation style="document" soapAction="tns:https://www.DemoService.test/NewOperation"/>
      <input>
        <soap:body use="literal" parts="in"/>
      </input>
      <output>
        <soap:body use="literal" parts="return"/>
      </output>
    </operation>
  </binding>

<!-- Concrete Service location-->
  <service name="DemoService">
    <port name="DemoServicePort" binding="tns:DemoServiceBinding">
      <soap:address location="http://www.example.com"/>
    </port>
  </service>

</definitions>


How are different Elements of WSDL related ?

This can be understood by below representation





Explain different versions of WSDL standards ?

The current version of the specification is 2.0; version 1.1 has not been endorsed by the W3C but version 2.0 is a W3C recommendation.





Explain elements/tags of WSDL ?


WSDL 1.1 Term
WSDL 2.0 Term
Description
Service
Service
Contains a set of system functions that have been exposed to the Web-based protocols.
Port
Endpoint
Defines the address or connection point to a Web service. It is typically represented by a simple HTTP URL string.
Binding
Binding
Specifies the interface and defines the SOAP binding style (RPC/Document) and transport (SOAP Protocol). The binding section also defines the operations.
PortType
Interface
Defines a Web service, the operations that can be performed, and the messages that are used to perform the operation.
Operation
Operation
Defines the SOAP actions and the way the message is encoded, for example, "literal." An operation is like a method or function call in a traditional programming language.
Message
n/a
Typically, a message corresponds to an operation. The message contains the information needed to perform the operation. Each message is made up of one or more logical parts. Each part is associated with a message-typing attribute. The message name attribute provides a unique name among all messages. The part name attribute provides a unique name among all the parts of the enclosing message.
Messages were removed in WSDL 2.0, in which XMLschema types for defining bodies of inputs, outputs and faults are referred to simply and directly.
Types
Types
Describes the data. The XML Schema language (also known as XSD) is used (inline or referenced) for this purpose.


What are  different types of WSDL ?
There are two types of WSDL
1.       Concrete WSDL
Abstract WSDL 


Can you define types of  WSDL ?

 Abstract WSDL contains only Types, Messages and Operations. Abstract WSDL is used by server side components programming.

Concrete WSDL contains all elements of WSDL, such as Types, Messages, Operations , Binding and Service transport specific information (JMS or Http). This is used by client side components. 





Refer Previous post on Interview questions at

1. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 1

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service.html

2. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 2

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_16.html

Tuesday 16 February 2016

SOA Interview Questions : Service Oriented Architecture Interview Questions Part 2

This Post is in continuation with my Previous post

SOA Interview Questions : Service Oriented Architecture Interview Questions Part 1

http://osb-dheeraj.blogspot.in/2016/02/soa-interview-questions-service.html



Can you Explain loose coupling, and How to achieve it ?

Loose coupling is an approach to interconnecting the components in a system or network so that those components, also called elements, depend on each other to the least extent practicable.
The Mediation pattern, using an enterprise service bus (ESB/OSB), will help in achieving
loose coupling to the highest level. It will establish independence between consumers and providers on all levels, including message formats (including SOAP, REST, XML, binary) and transport protocols (including HTTP, FTP, JMS, File, MQ, JCA Adapter, DB etc).
Architecturally speaking this means the separation of concerns between consumers and providers on the transport, message type, and message format levels.


How do I integrate my Legacy applications with SOA ?

Legacy applications are frequently at the core of your IT enterprise. With the right skills and tools, you need to identify discrete elements within your legacy applications and “wrap” them in standards-based interfaces and use them as services within your SOA. It is possible to integrate your legacy system with other system using SOA applications.
SOA and ESB technology provides support to most available message formats (including SOAP, REST, XML, binary, CSV, Text etc) and transport protocols (including HTTP, FTP, JMS, File, MQ, JCA Adapter, DB etc).




The Service of a SOA should be engineered as stateless or stateful ?

Service should be stateless. It may have a context within its stateless execution, but it will not have an intermediary state waiting for an event or a call-back. The retention of state-related data must not extend beyond a request/response on a service. This is because state management consumes a lot of resources, and this can affect the scalability and availability that are required for a reusable service.



How does the ESB/OSB fits in an Enterprise IT system ?

The Enterprise Service Bus is a core element of any SOA. ESBs provide the “any to any” connectivity between services within your own company, and beyond your business to connect to your trading partners and External service provoders. But SOA does not stop at just implementing an ESB. Depending on what your goals are, you may want to use an ESB to connect other services within your SOA such as information services, interaction services and business process management services. Additionally, you will need to consider development services and IT service management services. The SOA reference architecture can help you lay out an SOA environment that meets your needs and priorities. The ESB is part of this reference architecture and provides the backbone of an SOA but it should not be considered an SOA by itself.




Challenges faced in SOA adoption

While implementing a service-oriented architecture, a company faces below challenges :
  1. Service identification. What is a service? What is the business functionality to be provided by a given service? What is the optimal granularity of the service?
  2. Service location. Where should a service be located within the enterprise or outside Enterprise Firewall over Internet ?
  3. Service packaging. How is existing functionality within legacy mainframe systems to be re-engineered or wrapped into reusable services?
  4. Service orchestration. How are composite services to be orchestrated?
  5. Service routing. How are requests from service consumers to be routed to the appropriate service and/or service domain?
  6. Service governance. How will the enterprise exercise governance processes to administer and maintain services?
  7. Service messaging standards adoption. How will the enterprise adopt a given standard consistently?


What is Web Service ?

A Web service has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP (Simple Object Access Protocol) messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.
We can identify two major classes of Web services:
1.     REST-compliant Web services, in which the primary purpose of the service is to manipulate representations of Web resources using a uniform set of stateless operations.
2.    Arbitrary Web services, in which the service may expose an arbitrary set of operations.





While identifying services which one is better – top-down and bottom-up methodologies encourages re-use and maintenance?

Since the top-down approach is business-driven it can be practical to separate the different concerns of business and IT on different plans, providing a common ground in between. So in most situations it the most appropriate if you want to improve reuse and ROI in the medium/longterm.



What do you mean by  SOA governance? What are the  functions of governance?

SOA governance is a concept used for activities related to exercising control over services in service-oriented architecture (SOA) solutions. One viewpoint, from IBM and others, is that SOA governance is an extension (subset) of IT governance which itself is an extension of corporate governance.
Some key activities that are often mentioned as being part of SOA governance are:
11.     Managing the portfolio of services: This includes planning development of new services and updating current services.
22.     Managing the service lifecycle: This is meant to ensure that updates of services do not disturb current services to the consumers.
33.     Using policies to restrict behavior: Consistency of services can be ensured by having the rules applied to all the created services.
44.     Monitoring performance of services: The consequences of service downtime or underperformance can be severe because of service composition. Therefore action can be taken instantly when a problem occurs by monitoring service performance and availability.




1. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 3

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_21.html

2. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 4

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_77.html

http://osb-dheeraj.blogspot.in/2016/02/soa-interview-questions-service_15.html

SOA Interview Questions : Service Oriented Architecture Interview Questions Part 1



In this post we are going to cover the below questions, I am referring to SOA as Oracle SOA Suite for most cases :

1. What is SOA?
2. What is Service in relation to SOA?
3. Why SOA? (Most often asked question)
4. What is SCA ?
5. Can you describe the components of SCA ?
6. Are web-services SOA?


Lets begin, with your preparations for a good interview


1. What is SOA?

Service Oriented Architecture (SOA) is an architectural pattern in computer software design in which application components provide services to other components via a communications protocol, typically over a network. The principles of service-orientation are independent of any vendor, product or technology.

SOA is based on the concept of a service. Depending on the service design approach taken, each SOA service is designed to perform one or more activities by implementing one or more service operations. As a result, each service is built as a discrete piece of code. This makes it possible to reuse the code in different ways throughout the application by changing only the way an individual service interoperates with other services that make up the application, versus making code changes to the service itself.

SOA's Definition by Open Group :
Service-Oriented Architecture (SOA) is an architectural style that supports service-orientation. Service-orientation is a way of thinking in terms of services and service-based development and the outcomes of services.


2. What is Service in relation to SOA?

A service is a self-contained unit of functionality, such as retrieving an online bank statement. 
By that definition, a service is an operation that may be discretely invoked. However, in the Web Services Description Language (WSDL), a service is an interface definition that may list several discrete services/operations.

Services can be combined to provide the functionality of a large software application. SOA makes it easier for software components on computers connected over a network to cooperate.

Service Definition by Open Group:
- Is a logical representation of a repeatable business activity that has a specified outcome (e.g., check   customer credit, provide weather data, consolidate drilling reports)
- Is self-contained
- May be composed of other services
- Is a "black box" to consumers of the service


3. Why SOA ?

Oracle's Definition of Why SOA :
- Reduce time to market for new project integration
- Reduce integration cost and complexity
- Efficiently manage business and technology change
- Provide end-to-end solution monitoring with root-cause analysis
- Gain increased visibility to quickly react to business events
- Ensure high availability and scalability of the digitized platform

We can summarize the Why SOA in below points :
Loose coupling: Services maintain a relationship that minimizes dependencies and only requires that they maintain an awareness of each other.
Abstraction: Beyond descriptions in the service contract, services hide logic from the outside world.
Reusability: Logic is divided into services with the intention of promoting reuse.
Autonomy: Services have control over the logic they encapsulate, from a Design-time and a Run-time perspective.
Granularity: A design consideration to provide optimal scope and right granular level of the business functionality in a service operation.
Encapsulation: Many services are consolidated for use under the SOA.
Location Transparency: This refers to the ability of a service consumer to invoke a service regardless of its actual location in the network.
Standardized service contract: Services adhere to a communications agreement, as defined collectively by one or more service-description documents.
Discoverability: Services are supplemented with communicative meta data by which they can be effectively discovered and interpreted.


4. What is SCA?

Service Component Architecture (SCA) is a software technology designed to provide a model for composing applications that follow service-oriented architecture principles
The SCA Assembly Model consists of a series of artifacts, which are defined by elements contained in XML files.
The goal of Service Component Architecture (SCA), simply stated, is to reduce IT complexity
through a standardized framework for assembling disparate enterprise Service Oriented
Architecture (SOA) components into a higher-level composite, thus simplifying development,
deployment and management of enterprise applications.



5. What are the components of SCA ?

The following summarizes the 5 key elements of SCA shown above:
• Composite: deployment unit
• Service: entry-point into the composite. Services exposed by the component that are
callable from outside the composite are called promoted services
• Component: provides the logic to be used within the composite
• Reference: refers to internal and external services. As per the SCA spec, references to
external services are called “promoted references”
• Wire: connects services, components and references – no special semantic.
• Properties: allow for customization of a component’s behavior in a particular
deployment


6. Are web-services SOA?

No, SOA is a thinking, it’s an architectural concept, and web service is one of the technical approaches to complete it. Web services are the preferred standards to achieve SOA.
In SOA we need services to be loosely coupled. A web service communicates using the SOAP protocol which is XML based, which is loosely coupled.
SOA services should be able to describe themselves. WSDL describes how we can access the service.
SOA services are located in a directory. UDDI describes where we can get the web service. This is nothing but the implementation of the SOA registry.




Next post on the Interview questions can be found at

1. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 2

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_16.html

2. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 3

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_21.html

3. SOA Interview Questions : Service Oriented Architecture Interview Questions Part 4

http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_77.html
http://osb-dheeraj.blogspot.com/2016/02/soa-interview-questions-service_15.html