Software Architecture
Service-Oriented Architecture and the Enterprise Service Bus
Intermediate11 min readReviewed by Mariem Ouled on Updated
Service-oriented architecture reorganises an enterprise's applications around reusable, contract-first services instead of point-to-point integrations. This guide explains the problem SOA set out to solve, the properties of a well-designed service, the web-service standards and bus infrastructure that implemented it, governance, and the reasons the industry moved on to lighter styles without abandoning the core ideas.
What you will learn
- Explain the integration problems of application silos and point-to-point interfaces that SOA addressed
- State the defining properties of a service and distinguish a service from a component
- Read a SOAP message and a WSDL contract and explain the role of each part
- Describe the responsibilities of an enterprise service bus and when it becomes an anti-pattern
- Compare orchestration with choreography and SOA with microservices on concrete criteria
Service-oriented architecture (SOA) was the enterprise answer to a problem that still exists: dozens of applications, each built for one department, each with its own copy of customer data, wired together by hundreds of undocumented file transfers and database links. SOA proposed to expose each application's capabilities as contract-first services, route calls through shared infrastructure, and compose business processes from those services. The style peaked in the 2000s, was widely over-engineered, and then quietly became the foundation on which microservices and API platforms were built. Understanding it explains a great deal about the systems you will inherit and the vocabulary your architects use.
The problem: silos and spaghetti
Enterprises grow application by application. Sales gets a CRM, finance gets an ERP, operations builds a bespoke scheduling system, and each holds "the" customer record. When a process crosses departments — order to cash, claim to payment — data has to move between these silos, and the cheapest way at the time is a point-to-point link: a nightly extract, a database view, a direct API call.
With n applications, point-to-point integration tends toward n(n−1)/2 interfaces. Each is built once, documented rarely and owned by nobody after its author leaves. The consequences are predictable:
- Redundant, inconsistent data. Three customer masters that disagree about an address.
- Tight coupling. Changing a table in the CRM breaks a report in finance that nobody knew read it.
- No reuse. Credit scoring is reimplemented in the loan system, the card system and the leasing system.
- Rigid processes. A new distribution channel (mobile, a partner portal) means rebuilding every integration.
- Unmeasurable service quality. Nobody can say what the availability or response time of "get customer" is, because there is no such thing — only fifteen ways of reading the table.
SOA's premise is that these are architectural problems, not project problems, and that the fix is to introduce a layer of services with explicit contracts between the processes that need capabilities and the applications that provide them.
What makes something a service
Definitions vary, but the properties that matter in practice are consistent across them.
A service exposes a contract and hides its implementation. Consumers see an interface — operations, message formats, quality-of-service terms — and nothing else. The consumer must not know or care whether the service is backed by a mainframe, a Java application or a spreadsheet macro.
Boundaries are explicit. Calling a service is a message exchange across a boundary, with the latency and failure modes that implies. This is different from calling a method on a component in the same process, and designs that pretend otherwise (fine-grained chatty services) fail.
Services are autonomous. Each can be deployed, versioned and operated independently, and it owns the data it needs to fulfil its contract. Shared databases between services violate this and were the most common way SOA programmes undermined themselves.
Compatibility is based on policy, not code. Whether a consumer may call a service is decided by declared requirements — security, transport, reliability — rather than by sharing libraries.
Two further design attributes decide whether a service is actually reusable. Granularity should suit the consumer: a service that returns a full customer dossier when the caller needs a postcode is wasteful; one that needs twelve calls to assemble an address is chatty. Statelessness — no conversational state held between calls — makes services easier to scale and to replace, so it is the default, with long-running processes handled by an explicit process layer rather than by session state in the service.
Services versus components
A component is a unit of deployment inside an application: it has provided and required interfaces, configuration properties and a lifecycle managed by a container. A service is a unit of business capability offered across applications. The Service Component Architecture (SCA) specification tried to unify the two — assembling composites of components and exposing them as services over configurable bindings (SOAP, JMS, RMI) — and it is a useful way to think even if you never use an SCA runtime: components are how you build a service, services are what you expose.
The web-service stack
SOA is a style; SOAP web services were its dominant implementation for a decade. Three specifications carry most of the weight.
SOAP (originally Simple Object Access Protocol; the acronym was dropped in version 1.2) defines an XML envelope with a header for metadata — security tokens, addressing, transaction context — and a body carrying the payload. It is transport-neutral, though HTTP is used almost everywhere.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
<!-- WS-Security, WS-Addressing and similar headers go here -->
</soap:Header>
<soap:Body>
<getBalance xmlns="urn:example:accounts">
<accountNumber>FR7630006000011234567890189</accountNumber>
</getBalance>
</soap:Body>
</soap:Envelope>
WSDL (Web Services Description Language) is the machine-readable contract. A WSDL 1.1 document declares the XML Schema types used, the message structures, a portType listing operations, a binding saying how those operations map to a protocol (typically SOAP over HTTP), and a service giving the endpoint address. Tooling generates client stubs and server skeletons from it, which is why contract-first development was natural in this world: write the WSDL and schema, generate, then implement.
<definitions name="Accounts" targetNamespace="urn:example:accounts"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types><!-- XML Schema for request/response elements --></types>
<message name="getBalanceRequest"><part name="body" element="tns:getBalance"/></message>
<message name="getBalanceResponse"><part name="body" element="tns:getBalanceResponse"/></message>
<portType name="AccountsPort">
<operation name="getBalance">
<input message="tns:getBalanceRequest"/>
<output message="tns:getBalanceResponse"/>
</operation>
</portType>
<binding name="AccountsSoap" type="tns:AccountsPort"><!-- SOAP/HTTP details --></binding>
<service name="AccountsService">
<port name="AccountsSoap" binding="tns:AccountsSoap">
<soap:address location="https://api.example.com/accounts"/>
</port>
</service>
</definitions>
UDDI (Universal Description, Discovery and Integration) was the registry where services were meant to be published and discovered. Public UDDI registries were shut down years ago; private registries survived as the "registry and repository" component of governance tooling, and the idea reappears today as API catalogues and developer portals.
Around these sat the WS-* specifications: WS-Security for signing and encrypting messages, WS-ReliableMessaging for guaranteed delivery, WS-Addressing for routing, WS-AtomicTransaction for two-phase commit across services. They solved real problems and were also the reason SOAP acquired its reputation for complexity: interoperability between vendor stacks was fragile, and few teams needed more than security.
REST over HTTP with JSON displaced SOAP for most new interfaces because it needs no special tooling, maps naturally to the web's caching and security infrastructure, and lets clients be written in an afternoon. The trade-off is that REST has no standard contract language of equivalent rigour, a gap that OpenAPI later filled. The REST API design guide covers that style in depth; SOAP remains worth reading fluently because so many core enterprise systems still speak it.
The enterprise service bus
An enterprise service bus (ESB) is middleware that sits between service consumers and providers and performs mediation. Its typical responsibilities are:
| Responsibility | What it means | Example |
|---|---|---|
| Routing | Deliver a message to the right provider based on content or headers | Orders over a threshold go to the manual-approval queue |
| Protocol bridging | Accept one transport, call another | HTTP/SOAP in, JMS out to a mainframe adapter |
| Transformation | Convert between message formats | Partner's flat file to the canonical order XML |
| Orchestration | Sequence several service calls as one process | Create customer, then account, then card |
| Cross-cutting policy | Security, logging, throttling, monitoring applied uniformly | Validate the WS-Security token on every inbound call |
| Adapters | Connectors to packaged systems and legacy protocols | SAP, FTP, files, databases |
The design patterns an ESB implements — content-based router, message translator, splitter, aggregator, dead-letter channel — are catalogued in the Enterprise Integration Patterns literature and are equally relevant when you build the same thing with a broker and a few services.
A common companion concept is the canonical data model: one enterprise-wide schema for "customer", "order" and so on, into which every application's format is translated. It reduces the number of transformations from n² to 2n but tends to become an enormous lowest-common-denominator schema that every team must change together. Modern designs keep formats local to a bounded context and translate at the boundary, a point developed in the domain-driven design guide.
Where the bus went wrong
The ESB's failure mode is that it is convenient to put logic in it. A routing rule becomes a validation, a validation becomes an enrichment call, and within a few years the bus contains the company's most important business rules, owned by a central integration team that every project queues behind. Deployments of the bus become high-risk events because everything runs through it. Vendors sold ever larger suites — bus, process engine, rules engine, registry, monitoring — and the licence and skills cost pushed organisations toward a single shared instance, which maximised coupling.
The lesson that microservices drew was "smart endpoints, dumb pipes": keep transformation and rules inside the services that own the data, and use infrastructure only to move messages. Integration logic did not disappear; it moved to where the domain knowledge lives.
Processes, orchestration and choreography
Services become valuable when composed into business processes. Two models exist.
Orchestration puts a central conductor — a process engine executing a model written in BPMN (Business Process Model and Notation) or, historically, BPEL — in charge. The engine calls services in order, waits for replies or human tasks, handles timeouts and escalations, and records the state of every running instance. Business analysts can read the model; operations can see where each instance is stuck. The engine is also a single place where the whole process is coupled.
Choreography has no conductor. Each service reacts to events published by others: when an order is placed, inventory reserves stock and publishes "stock reserved", billing charges the card on hearing that, shipping dispatches on hearing "payment captured". Coupling is minimal and each team owns its step, but nobody has the end-to-end view, and answering "where is order 4711?" requires correlating events across services.
The distributed transactions guide returns to this choice in the context of sagas; the same trade-off applies at every scale.
Alongside process engines sit business rules engines, which extract decision logic — eligibility, pricing, scoring — from code into rule tables the business can maintain. They were sold as part of the SOA suite and are useful precisely when rules change more often than the surrounding software; they are counter-productive when they become a second programming language nobody tests.
Governance and method
SOA lives or dies on governance, because reuse only happens if services are findable, trusted and stable.
- Service portfolio and ownership. Each service has a named owner, a lifecycle state (planned, active, deprecated, retired) and a versioning policy. Deprecated versions run in parallel with a published sunset date.
- Contracts and quality of service. The contract includes non-functional terms: response time per operation, availability, data freshness (real-time versus overnight batch), throughput limits. Without these a consumer cannot decide whether a service is fit for its purpose.
- Design standards. Naming, schema conventions, error handling and security profiles are agreed once so that consumers do not learn a new dialect per service.
- Registry. A catalogue where services, contracts, owners and consumers are recorded. Its modern descendant is the developer portal of an API management platform.
The classic design method runs top-down from business process to service: model the processes, identify the business entities and the activities that act on them, group activities into candidate services by cohesion and reuse, map each candidate to existing applications or new build, then define contracts. Bottom-up approaches — wrap what exists and expose it — deliver faster but reproduce the silos' shapes. Most programmes need both: bottom-up for the first year to prove value, top-down to shape what comes next.
SOA compared with microservices
The two styles share their principles and differ in scope, granularity and infrastructure.
| Criterion | SOA (classic) | Microservices |
|---|---|---|
| Scope | Enterprise-wide integration of existing applications | Decomposition of one application or product |
| Service size | Coarse-grained business services | Small, single-capability services |
| Communication | SOAP, ESB mediation, often synchronous | HTTP/JSON, gRPC, lightweight brokers |
| Logic placement | Bus and process engine carry logic | Logic in services; infrastructure is dumb |
| Data | Frequently shared databases | Database per service |
| Governance | Central, design-time, board-driven | Decentralised, automated, team-owned |
| Deployment | Application servers, shared bus instance | Containers, independent pipelines |
| Organisation | Central integration team | Product teams owning services end to end |
Treat the comparison as a spectrum rather than a verdict. An organisation with two hundred packaged applications still needs integration architecture at enterprise scale, and lessons from SOA governance apply directly; a single product team splitting a monolith needs the microservices playbook. The mistake is applying either at the wrong scale.
Common mistakes
Services that expose the database. A "customer service" with getCustomerRow and updateCustomerRow operations is a remote table, not a service; every consumer still depends on the schema. Fix: operations in business terms (openAccount, changeAddress) with the schema hidden.
Chatty fine-grained interfaces. Designing SOAP operations like local methods produces ten round trips per screen. Fix: coarse operations that return what a use case needs in one call.
Everything through the bus. Two services in the same team calling each other via the central ESB adds latency, a deployment dependency and a ticket queue. Fix: use the bus for cross-domain and legacy integration; let closely related services talk directly.
Canonical model as a monolith. One enterprise schema that every project must extend. Fix: canonical formats per business domain, translation at the boundaries.
Governance without automation. Review boards that approve every contract by hand become the bottleneck and get bypassed. Fix: encode standards as linters, contract tests and pipeline checks; reserve human review for design decisions.
Ignoring quality of service. Publishing a service without stating its response time or availability. Fix: every contract states measurable terms and the monitoring proves them.
Key takeaways
- SOA addressed real problems — silos, point-to-point spaghetti, duplicated data and logic — by introducing contract-first services with explicit boundaries.
- A service hides its implementation, owns its data, is autonomous and stateless by default, and is designed at a granularity that suits its consumers.
- SOAP, WSDL and the WS-* specifications implemented SOA in the 2000s; REST and OpenAPI replaced them for new interfaces, but SOAP systems remain everywhere.
- The ESB provides routing, transformation, protocol bridging and orchestration; its failure mode is absorbing business logic and becoming a central bottleneck.
- Orchestration gives visibility and control at the cost of central coupling; choreography gives autonomy at the cost of end-to-end visibility.
- Governance — ownership, contracts with quality-of-service terms, standards, a registry — is what makes reuse real, and it works only when automated.
- Microservices keep SOA's principles and reject its infrastructure and centralisation; choose by scale, not by fashion.
Sources and further reading
Frequently asked questions
- Is SOA dead?
- The label fell out of fashion; the ideas did not. Contract-first interfaces, service autonomy, ownership of data behind an interface and reuse across channels are exactly what microservices and API management practise today. What died was the heavyweight implementation: large central buses, WS-* stacks and governance boards that slowed delivery to a crawl.
- What is the difference between an ESB and an API gateway?
- An ESB sits between internal applications and does mediation: routing, protocol bridging, transformation and orchestration, often with significant logic inside it. An API gateway sits at the edge and handles cross-cutting concerns for HTTP APIs — authentication, rate limiting, analytics — while deliberately keeping business logic out. Gateways are thin by design; buses grew thick by habit.
- Do I still need SOAP for anything?
- You need to read it. Many banking, insurance, public-sector and logistics systems expose SOAP interfaces that will outlive several generations of front ends, and standards such as WS-Security are still used for signed, encrypted B2B exchanges. For new interfaces, HTTP/JSON with an OpenAPI description is the default unless a partner mandates otherwise.
- Is orchestration with a central process engine always bad?
- No. A central engine is the right choice when the business needs to see and manage a long-running process end to end — a loan application, a claim — with timeouts, escalations and audit. It becomes a problem when it accumulates every integration rule in the company and every team must wait for the bus team to change it.