Scrivio Interview library
ScenarioAdvanced6 min read · updated 12 November 2026

Your company still exposes 60 SOAP services to banks and government partners, and new teams no longer know the stack. Should you modernise them, and how?

I would modernise the implementation but not force partners off SOAP. Banks and government partners often require SOAP and WS-Security by contract or regulation, so retiring it is a business decision. The practical path is to keep each SOAP contract stable as a thin adapter over modern internal REST or messaging services, or translate at a gateway where WS-Security and faults allow it, offer REST or event APIs to partners who want them with a long migration period, measure usage per operation to retire what nobody calls, and keep the knowledge alive with documentation, contract tests from real partner messages and named owners.

Why this question is asked

Many companies have an integration layer like this: dozens of SOAP services, built ten or fifteen years ago, that bring in real money and that fewer and fewer engineers understand. The question tests judgement more than technology. Interviewers want to see that we separate the external contract from the internal implementation, respect partners' constraints, and reduce risk step by step instead of proposing a big rewrite. In this answer, we will look at why SOAP persists, the options for modernising, the migration of partners, and how to keep the remaining stack safe to change.

1Why the SOAP Contracts Exist and Who Decides

Before deciding anything, we should understand why partners use SOAP. A bank's integration contract might specify SOAP 1.1, a particular WSDL, WS-Security with X.509 signatures and timestamps, and a certification process that takes months. A government agency might be bound by a national interoperability standard. For these partners, changing the protocol means a new project with their own budgets, testing and approvals.

So whether SOAP is removed is a business decision, made with product owners, partner managers and sometimes legal, not something engineering can decide alone. What engineering can decide is how the services are built behind those contracts. That distinction shapes the whole plan: the outside can stay stable while the inside changes completely.

2Option 1: A Thin SOAP Adapter Over Modern Services

The approach with the lowest risk keeps each WSDL exactly as it is and turns the SOAP service into an adapter. The adapter receives the SOAP request, validates it, handles WS-Security, maps the payload to a call on a modern internal REST API or a message on a topic, and maps the result back into the SOAP response or fault. All business logic moves into the internal services, where new teams work with the tools they know.

This can be done one service at a time, which is the strangler pattern: route one operation through the new path, compare results, then move the next. Because the contract does not change, partners notice nothing, and each step is small enough to roll back.

Step throughSOAP kept at the edge, modern services behind it
  1. Bank and government partnerssame WSDL, same endpoints, same WS-Security
  2. SOAP adapter layerSpring WS: validation, WS-Security, mapping, faults
  3. Internal REST and messaging APIsbusiness logic, owned by product teams
  4. Databases and core systemsunchanged by the protocol at the edge

4 layers, from the top down. Step through them one at a time.

The partner contract stays fixed while everything behind the adapter is modernised.

3Option 2: Translating SOAP at an API Gateway

Some API gateways can expose a SOAP endpoint and translate it to a REST backend, which avoids writing adapters at all. That is attractive for simple operations, but it needs care. WS-Security processing, such as verifying signatures and timestamps, decrypting parts of the message and signing responses, must be supported by the gateway exactly as each partner implements it, and partner implementations vary. SOAP faults must be mapped precisely from REST error responses, including fault codes and detail elements that partners' code may depend on. And complex schemas with choices, attachments or strict namespaces can be hard to express in gateway mapping rules.

So I would use gateway translation for straightforward operations, and keep adapters in code for those with heavy security or complex payloads. Either way, contract tests decide whether the translation is good enough.

4Offering Modern APIs and Retiring What Is Unused

Some partners will welcome a REST or event API, especially fintech companies and newer agencies. We can offer a documented REST API, or events through webhooks, alongside SOAP, built on the same internal services so there is no duplicated logic. Migration is voluntary and long: for example, an announced period of two to three years, support from our integration team, and incentives such as faster onboarding or new features that only the new API has.

Meanwhile we measure. Logging calls per operation per partner usually shows that a large share of the 60 services, or of their operations, are rarely or never called. Those are the easiest wins: we confirm with the partner managers, announce retirement and remove them. Retiring 20 unused services halves the maintenance surface without touching any active partner.

Example: usage after three months of measurement
GroupServicesCalls per monthPlan
Core payments and status12about 40 millionadapter over internal APIs first
Regular partner reports18about 2 millionadapter, offer REST alternative
Rarely used11under 1,000ask partners, plan retirement
Never called190confirm and retire
Measuring first turns 60 services into four groups with different plans.

5Keeping the Knowledge Alive

Whatever remains on SOAP must stay safe to change, which means the knowledge cannot live only in the heads of two senior engineers. Each service needs a named owning team, written documentation of its contract, its WS-Security setup, its certificates and their expiry dates, and a runbook for the partner's common problems.

The most valuable safety net is a set of contract tests built from real partner messages: anonymised request and response samples, including faults, replayed in the build against the adapter. When someone upgrades Spring WS, a JAXB library or a certificate, those tests show whether anything a partner sees has changed. We should also keep the stack current, for example on Spring Web Services and Jakarta EE versions that receive security fixes, so the SOAP layer does not become the oldest, least patched code in the company.

6Follow-up questions

Would you rewrite all 60 services in one programme?

No. A big-bang rewrite of 60 partner-facing services carries high risk and delivers nothing until the end. Moving service by service behind stable contracts gives value early, lets us learn from the first few, and keeps every step reversible.

How do you handle certificates and WS-Security in an adapter layer?

Centralise them. The adapter layer holds keystores in a secret manager, tracks certificate expiry with alerts weeks in advance, and uses one well-tested WS-Security configuration per partner profile. That removes a common cause of outages, an expired signing certificate nobody remembered.

What if a partner insists on SOAP forever?

Then SOAP stays for that partner, and that is fine. The cost of keeping one well-tested adapter is small once the business logic lives in modern services. The goal is a maintainable system, not the removal of a protocol for its own sake.

7Conclusion

In this answer, we saw that SOAP persists because partners often require it with WS-Security for contractual or regulatory reasons, so removing it is a business decision. We modernised behind stable contracts with thin SOAP adapters over internal REST or messaging services, used gateway translation only where WS-Security and fault mapping allow, offered REST or event APIs with a long migration period, measured usage per operation to retire unused services, and kept the remaining stack safe with documentation, owners and contract tests built from real partner messages.

What to say in the interviewAbout 90 seconds aloud

Open with

I would separate the contract from the implementation. Banks and government partners often require SOAP and WS-Security by contract or regulation, and changing that means projects on their side, so whether SOAP goes away is a business decision with product and partner managers.

Then, if they want more

What we control is what sits behind the WSDL. My main approach would be to keep every contract exactly stable and turn each service into a thin Spring WS adapter: it validates the message, handles WS-Security, calls modern internal REST or messaging services and maps the result and faults back.

We move one service at a time, strangler style, comparing results. For simple operations an API gateway that translates SOAP to REST can work, but only if it handles each partner's WS-Security and our fault mapping exactly.

In parallel, I would offer REST or event APIs to partners who want them, with a long migration period of a couple of years, and I would measure calls per operation, because usually a good share of services are barely used and can be retired with the partners' agreement.

And for whatever stays, I would keep knowledge alive: named owners, documentation of contracts and certificates, and contract tests built from real anonymised partner messages so that upgrades cannot silently change what partners see.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Your company still exposes 60 SOAP services to banks and government partners, and new...": https://scrivio-interview-library.netlify.app/spring-boot/web-other/79a8445528/