A production-style SOAP web service built with Spring Boot that simulates core ATM operations such as withdrawals, deposits, balance inquiries, and transfers.
This project demonstrates enterprise backend patterns including SOAP messaging, fault handling, transaction management, idempotency, and audit logging.
- SOAP 1.2 Web Service (Spring Web Services)
- WSDL generation from XSD schemas
- Account operations:
- Withdraw
- Deposit
- Balance Inquiry
- Transfer
- One-way event handling (SessionEndedEvent)
- Global SOAP Header validation (TransactionHeader)
- Idempotency via transaction tracking
- Structured fault handling:
- Business Faults (client errors)
- Technical Faults (system errors)
- Audit logging with separate transaction scope
- PostgreSQL integration via JPA
- Java 17+
- Spring Boot
- Spring Web Services (SOAP)
- Spring Data JPA
- PostgreSQL
- JAXB (XML binding)
Client (SOAP XML)
↓
MessageDispatcherServlet (/ws/*)
↓
Endpoint (AtmEndpoint)
↓
Service Layer (AccountService)
↓
Repository Layer (JPA)
↓
PostgreSQL
- Interceptors → Header validation
- Exception Resolver → SOAP Fault mapping
- Audit Service → Independent transaction logging
WSDL available at: http://localhost:8080/ws/atm.wsdl
All requests must include:
<TransactionHeader xmlns="http://bank.com/atm/header">
<transactionId>123456</transactionId>
<clientTimestamp>2026-03-25T10:00:00</clientTimestamp>
<channel>ATM</channel>
</TransactionHeader><WithdrawRequest xmlns="http://bank.com/atm">
<accountNumber>11111</accountNumber>
<amount>100.00</amount>
</WithdrawRequest>- Missing header
- Invalid amount
- Insufficient funds
- Duplicate transaction
- Unexpected system failures
- Database issues
All faults are returned as structured SOAP responses.
Transactions are tracked via transactionId.
Duplicate requests are rejected to prevent double processing.
Every operation is recorded in the audit_logs table using a separate transaction.
git clone <repo-url>
cd atm-soap-serviceCreate:
cp application.example.yaml application.yaml./mvnw spring-boot:runhttp://localhost:8080/ws/atm.wsdl
The system auto-seeds:
| Account | Balance |
|---|---|
| 11111 | 5000.00 |
| 22222 | 100.00 |
config/ → SOAP config, interceptors, fault mapping
endpoint/ → SOAP endpoints
service/ → business logic
repository/ → database access
entity/ → JPA entities
model/ → request/response objects
fault/ → SOAP fault models
exception/ → business & technical exceptions
xsd/ → schema definitions
-
Enterprise-level SOAP service design
-
Strong separation of concerns
-
Robust error handling strategy
-
Production-style logging and validation
-
Idempotent transaction processing
-
Swagger (REST wrapper if needed)
-
Integration tests
-
CI/CD pipeline
-
Authentication (WS-Security)