Interview Questions On Java,Java EE

Enter your email address:

Add to Technorati Favorites
Google PageRank Checker
Showing posts with label Service Oriented Architecture. Show all posts
Showing posts with label Service Oriented Architecture. Show all posts

Sunday, January 11, 2015

Simplifying Service Oriented Architecture

Continue reading...

Friday, April 11, 2008

How to develop,test and maintain SOA based solutions?

Most significant part of any development life cycle is Analysis and Design phase and SOA is also not an exception.IBM has been consistently working in direction to lay down systematic approaches to identify and realizes services for SOA.

As I have discussed earlier, analysis and design part of SOA centers around three approaches SOAD,SOMA and BDD.If you want to recap these concepts then read my blog 'Constituents of SOA'.

In this post, my focus will be to develop SOA using web services.I will talk about webservices in its underlying technologies and in next post, how Apache Axis works to create web services over SOAP and several tools to test webservices.I will take a step-by-step approach for creating one simple web service using Apache Axis meant for Java. Apache Axis also supports C++.The web service example mentioned in this blog requires fair knowledge of Java for its audiences to put this knowledge into practise.

Web services are network based collection of business logic which can be accessed over several protocols like HTTP,SMTP etc.A web service is requested over a network via an XML based SOAP envelope and response is also sent via an XML over the same mechanism.The interoperability of web services is tremendous as it is using XML for communicating and makes it loosely coupled.A Webserivce is consisted of following technologies:

SOAP(Simple Object Access Protocol)

From the draft W3C specification:

SOAP is a lightweight protocol for exchanging structured information in a decentralized, distributed environment. It is an XML based protocol that consists of three 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 datatypes, and a convention for representing remote procedure calls and responses.

An example of SOAP envelope:

<routing and meta-message info/>
<message payload/>

Sample code to create SOAP Envelope using API provided by Apache –AXIS and call a Web Service

Service service = new Service();
Call call = (Call) service.createCall ();
SOAPEnvelope req = new SOAPEnvelope();
SOAPBodyElement soapBodyElement = new SOAPBodyElement();
SOAPElement eventIdElement = soapBodyElement.addChildElement(
SOAPElement authTokenElement = soapBodyElement.addChildElement(

SOAP Envelope generated by this code:

<soapenv:Envelope xmlns:soapenv="" xmlns:xsd="" xmlns:xsi="">
<ns1:EVENT xmlns:ns1="">
</ ns1:EVENT >

WSDL(Web services Definition Language):

An XML based technology to define a standardized interface for a webservice.WSDL standardizes how a web service represents the input and output parameters of an invocation externally, the function's structure, the nature of the invocation (in only, in/out, etc.), and the service's protocol binding. WSDL allows disparate clients to automatically understand how to interact with a web service.

UDDI(Universal Description,Discovery Interface):

UDDI provides a worldwide registry of web services for advertisement, discovery, and integration purposes. Business analysts and technologists use UDDI to discover available web services by searching for names, identifiers, categories, or the specifications implemented by the web service.

UDDI provides a structure for
representing businesses
business relationships
web services
specification metadata
web service access points.

UDDI has several different uses, based on the perspective of who is using it.From a business analyst's perspective, UDDI is similar to an Internet search engine for business processes. A business analyst can browse one or more UDDI registries to view the different businesses that expose webservices and the specifications of those services.

Prior to the UDDI project, no industry-wide approach was available for businesses to reach their customers and partners with information about their products and web services. Nor was there a uniform method that detailed how to integrate the systems and processes that are already in place at and between business partners.

Conceptually, a business can register three types of information into a UDDI registry. The specification does not call out these types specifically, but they provide a good summary of what UDDI can store for a business:

White pages : Basic contact information and identifiers about a company, including business name, address, contact information, and unique identifiers such as D-U-N-S numbers or tax IDs. This information allows others to discover your web service based upon your business identification.

Yellow pages :Information that describes a web service using different categorizations (taxonomies). This information allows others to discover your web service based upon its categorization (such as being in the manufacturing or car sales business).

Green pages :Technical information that describes the behaviors and supported functions of a web service hosted by your business. This information includes pointers to the grouping information of web services and where the web services are located.

Some Basic Info for Service Registration:

1. Business Entity,Business Entity Name,Business Entity Description

2. Business Service,Business Service Name,Business Service Description

3. Binding Template,Binding Template Description,Access Point Information

4. TModel,TModel Name,TModel Description

Overview URL (path of the WSDL file)

Business Entity
includes information about the actual business e.g. the business name, description, contact information.
Business Service
includes information about a single web service or a group related with web services.
Binding Template
includes information about how and where to access a specific web service.
includes descriptions and pointers to external technical specifications.

Tools Used for UDDI:

jUDDI : To create a private registry

UDDI4j : API that helps in communicating with a UDDI registry server

Most of the IDEs provide UDDI browser to search and access Web Services

Web Service Browser in RAD

You have to
Switch to J2EE perspective
Goto : Run > Launch the Web Service Explorer

Here I have shown how you can go on implementing Web Service using RAD but Eclipse with WTP support can also support this.

Continue reading...

How SOA makes things better or even worse?

With all the hype that SOA has brought to organizations, they have to brainstorm whether this will do any good to their business anyway.The organizations first have to understand that SOA can not be implemented by introduction of certain software products or services but it is an architectural approach which has to analyze existing systems,IT resources,ever changing business processes and requirements and comes up with a set of business aligned services which can cost effectively fit very well for a consistent business functioning for years to come.

As discussed in my previous blog , SOA projects can easily be put into red zone if all its constituents are not well planned,managed and executed.A change is like oxygen for an organization and SOA has to help businesses adapt with changing times and technology too changes rapidly beyond our imagination and in these times keeping an IT plan for next ten years for an organization is a daunting task.No matter how smart we think SOA can take away all our business woes through new ideas , if not implemented with success then it may turn out to be a nightmare for IT people,with all flaks from business people.SOA brings technological,organizational and cultural changes to businesses and onus to succeed for ones business lie on all stakeholders involved.There is very thin line between success and failure in such type of initiatives.

I will summarize in following points when SOA can be a disaster for an organization and all its stakeholders:

1. When business requirements and business process of all stakeholders are not very well defined,synchronized and upgraded.
2. All redundant processes are not replaced with efficient ones and constant communication among all stakeholders(business partners,vendors,suppliers,architects,project managers,senior management etc.) is not frequent and productive enough to define clear scope of work.

3. A Enterprise Service Bus is not identified and established which is responsible for communication of different applications,resources in varied technologies and platforms to communicate with one another.

4. A definitive project plan with micro details of milestones,risks and their mitigation is missing.

5. An identification of various project critical services(applications,process,infrastructure,security,data access,integration,development,testing,monitoring) is not well defined and designed.

7. Improper performance tuning,scaling may mar sole purpose of efficiency of business functioning.

8. Development of new services as spaghetti services ignoring how well will it fit in large picture .

Continue reading...

How to avoid risks in SOA implementation?

SOA project may go haywire if things are not planned,managed and designed properly.

It is very important to know your customer's requirements,expectations and improved business processes in advance before starting any analysis and design exercise.A continuous communication with your client is must so that you can understand their business processes very well and should be able to identify problem areas with some concrete solutions in mind.If you have a suggestions related to business processes improvement then get an approval from your client on business requirements as they keep changing all the time.So scope of work is clearly defined to you and your customer with extensive project planning.If a customer does not see any qualitative improvement in complex business processes simplification/replacement with new improved business processes,he is going to make a lot of hue and cry about introducing new technological architecture.An organisation is always interested in synchronisation and improvement of its business process with its customers,suppliers and partners for improved productivity irrespective of what technological steps are required to achieve it.Hence if anything goes disastrously wrong then SOA will bear all blame along with people involved.

Do not end in developing spaghetti services,it means,do not jump into implementation of services right away without analyzing its impact and overall inclusion in a large picture.Avoid duplication of services and create standards based infrastructure to build services upon.A service must be properly designed to address unexpected issues which may come in future.A solution to avoid spaghetti services is creation of a single Enterprise Services Bus(ESB). An ESB is a distributed infrastructure that is based on service standards.It is a single point for routing,securing messages(single sign on etc.).It enables any system to talk to other systems which are plugged in to ESB by providing necessary transformations required to messages to do that.An ESB empowers network administrators to monitor and audit all message traffic to provide with accurate metrics, giving complete visibility into how the services are being used, and how performance can be tuned.
As SOA is paradigm shift from object oriented technology to messages, which is a base unit of a service, based development, it is quite significant to distinguish and application from a service.So segregation of application team from a services team leads to a focused approach where applications developed will have interfaces which are consumed by services.The interfaces give lot of flexibility in order to integrate applications with services, so a great care should be taken in mind in designing and developing them.
A multi-layered services development is a smart approach of building services.First chalk out all fine grained services which may exist in SOA based solution and then build coarse grained services aggregating fine grained ones.In this way, the solution will be able to withstand requirement changes occurring every now and then.Even design patterns will also fit well in such scenarios, session facade and mediator design patterns gel very well to web services.

A plan for configuration management,performance tuning and scalability is must.None will care whether SOA is in place or not but how a solution efficiently runs a business that matters most to the end user.They want a high performance and do not want their system to work at snail's pace.The architects have to plan for scaling issues at design time for improved performance of the system.The database resources,session state management,services usage pattern,security of services involving cryptography,XML processing , they all are highly CPU engaging activities.So deciding about the right choice of hardware and scaling techniques are essentials of design time.The grid computing is highly scalable and robust but then the choices made are highly dependent on what requirements one has.

Continue reading...

When to avoid implementation of SOA?

SOA offers a change in perspective, a paradigm shift from object oriented to service oriented.As for almost a decade, most of the development is done using Object oriented technologies and that led to tight coupling many a times with vendor specific technologies like CORBA,DCOM or RMI.SOA offers to a new thinking of services rather visualizing in terms of objects which makes it independent of underlying technology.

If SOA implementation in an organization is not well thought of,planned and micro-detailed then it may lead to disaster, waste of valuable resources of time and money.SOA may not be a good idea for enterprises which are not too big and complex in their business process and do not depend upon business processes of its suppliers and business partners.For instance, if an organisation which has distributed applications across the differ net geographies then it will be a good idea to implement SOA to integrate various applications to provide one cost effective,scalable and futuristic solution which will be capable to plug services on top of new applications.SOA does not make a good business sense for organization which have very simple business processes,not involving too many business entities where a lot of collaboration is required to complete the business, for example a small online business of selling decorative items,which does not have heavy and business critical dependency on its suppliers to do business in a limited area.

Avoid using SOA for the sake of it,makes sense when it helps orchestration of complex,multi department/partners/suppliers business processes to smoothen overall business value chain.

Moreover, a SOA project can be jeopardized due to lack of proper,detailed,refined business requirements,inaccurate project planning and more factors which I will take up in my forthcoming blogs which will primarily focus on shortcomings of SOA projects and how to avoid them.
Continue reading...

Who suits best for SOA?

The IT infrastructure which includes various business critical systems of an enterprise are built over a long period of time.They cannot always be made with latest technologies as their is already investment being made in earlier systems.The organizations which breathe change like oxygen have to think new ways in order to integrate all its existing systems,new or legacy, in order to orchestrate its business process with its partners,suppliers and customers.The IT strategies of organizations change with mergers and acquisitions and leads to more vendor or application specific systems, sometimes repeat of an application by different vendor, in such a scenario whole IT landscape of an organization becomes quite complex.

SOA has opened new vistas to re-orient business on disintegrating business processes into services based over business components in such a way that existing business solutions and previously non communicating systems can also fit into the big picture.In a way it has given organizations a leverage to build new possibilities in a cost effective manner.The cost is a major driving factor upon which enterprises are banking their hopes on SOA.

The business houses want agile systems but without paying more to IT organizations and this has led IT organization has challenge to provide cost effective solutions through integrating legacy systems with new agile systems having new business capabilities.The only way this can be achieved through transformations in approaches for business and IT organizations together.

Continue reading...

What are the constituents of SOA?

There has been lot of terms which have been surfaced to define constituents of SOA delivery process and specially IBM has been actively coining new terms in order to streamline how SOA based solutions be developed.

Service-Oriented Analysis and Design (SOAD)
Service-Oriented Modeling and Architecture (SOMA)
Business-Driven Development (BDD)

I will try to briefly describe and simplify these terms.

There is no formal definition of SOAD as yet from IBM.SOAD takes a hybrid approach of Object Oriented Analysis and Design(OOAD),Enterprsie Architecture(EA) frmawork and Business Process Management(BPM) approaches for SOA based solutions development.

As per Gartner, more than 60% mission critical applications of various enterprises will be built using SOA by 2008.So that's what whole hype all about SOA.

SOMA lays out details of how SOA based solutions can be compartmentalized.It includes analysis and design aspects which have major focus on identification,specification and realization of SOA components on top of which services are built.

BDD covers business aspect of services.The term Business Process Choreography incorporates different dimensions of how business requirement gathered, transformed into business models which can then be propagated into an service based IT solution,

To know more in detail check out these resources:


Continue reading...

Why SOA?

With advent of IT revolution, it is information that people want and technology is a mean to supply it and with time it is provided at lower costs.So keeping the costs continuously low is a challenge.These days business houses have huge dependency on IT and it cannot be wiped out completely.It makes great business sense to save costs that incur on big investments that these organizations do on IT infrastructure for running their complex business processes.

The existing systems in an organization are rarely thrown away and they are valuable asset for enterprise from business point of view.SOA leverages the benefits of integrating new systems with old legacy ones.It is instrumental in linking IT resources and put them to reuse.The cost effectiveness of this style of architecture focuses on services rather on objects.The similar concepts have always been around like Java Connector Architecture propounds the same concepts so SOA is a kind of evolution of existing set of knowledge mainly driven by organizational needs.

The integration of various systems through SOA includes a rich end user experience, application connectivity, all building components forming various business processes work in tandem or a fancy term for that 'orchestration or harmonizing of processes' and one stop shop for all information.This enhances an incremental development and integration approach even existing systems can be split into components with time giving more flexibility for futuristic business requirements.

There is a very common notion of associating SOA with web services but it is beyond that.Web services are a collection of technologies, including XML, SOAP, WSDL, and UDDI, which provide programming solutions for specific messaging and application integration problems. While SOA is an architecture and I think I have written it how it can be exploited by other technologies like CORBA,DCOM,JINI etc.

In telecom systems, for example, there are standalone systems,monolithic in nature which ideally do not collaborate with other systems specially which are network related as network management system is.SOA suits a great deal to such situations where interoperability opens new vistas.

While designing developing and implementing those services a user needs not be worried about its details and therefore they can run on distributed environments across networks.This also maximizes their reuse.
Continue reading...

What is SOA?

SOA has become a de-facto standard for system development and integration of new with existing legacy solutions running and supporting complex business processes.SOA, as IT world has always a fancy term for any new technology,elaborates to Serivce Oriented Architecture, is not a new term and has been around with emergence of webservices.

In order to understand SOA, we must first understand what a webservice means, which is sometimes referred as crux of SOA,not always though.A system does not necessarily need to use web services and all related standards to be "service-oriented." For example, some service oriented systems have been implemented using Corba,DCOM,RPC, Jini and REST.A webservice is defined by a set of processes over a network which is a manifestation of some physical entities like databases,devices,programs.It is an interface or gateway for one program/device/system to have a controlled access over a network to other program/device/system like humans need some sort of GUI to interact with one system.A webservice accepts a command as a SOAP envelope to expedite some task and sends response in a form of SOAP envelope too.SOAP(Simple Object Access Protocol) is protocol which uses XML based messages generally over HTTP.A webservice is loosely coupled and flexible , it means a consumer of a web service is not tied to that web service directly; the web service interface can change over time without compromising the client's ability to interact with the service. A tightly coupled system implies that the client and server logic are closely tied to one another, implying that if one interface changes, the other must also be updated. Adopting a loosely coupled architecture tends to make software systems more manageable and allows simpler integration between different systems.

Apart from SOAP, other key constituents of a webservice are WSDL and UDDI.

WSDL(Web Services Description Language) is an XML technology that describes the interface of a web service in a standardized way. WSDL standardizes how a web service represents the input and output parameters of an invocation externally, the functions' structure, the nature of the invocation (in only, in/out, etc.), and the service's protocol binding. WSDL allows disparate clients to automatically understand how to interact with a web service.

UDDI(Universal Description, Discovery, and Integration - An XML-based registry to publish service descriptions (WSDL) and allow their discovery.UDDI is used to discover available webservices by searching for names,identifiers,categories or specifications implemented by the web service.

SOA is an extension to EAI(Enterprise Application Integration), which is technology independent whether it is Java,.Net,CORBA or webservices.This has given rise to enormous potential of varied and vast scope of application integration in fast changing,ever evolving and getting more and more complex business requirements.Since the large organizations have lot of existing systems over different geographical locations,with different operating systems using different technologies doing different business operations, these organizations have found SOA as a big solution to their burgeoning problem of keeping their IT budgets in control vis a vis addressing their growing business requirements.The continuous IT growth within organizations have given rise to a new level of complexity and challenge to bind existing legacy,business critical solutions with new ones and that's where SOA fits in putting all different pieces together.When all the hype associated with SOA will reside and organizations will get more close to reality then its fruits will be reaped.
SOA has some ground features which drives development and maintenance of SOA based solutions:
  • Extensibility

  • Interoperability

  • Loose Coupling

  • Reusablity

  • Granularity

  • Modularization

  • Componentization

  • Services Identification and categorization

  • Services Provisioning and delivery

  • Services Monitoring and tracking

  • Basics of Object Oriented Technology like Abstraction,Encapsulation
Continue reading...

Interview Questions On Java,Java EE Copyright © 2017. Reads: best tracker