All Projects
Backend
MicroBank — SOAP Web Service (JAX-WS)
A SOAP web service built with JAX-WS: a standalone 'MicroBank' endpoint exposing currency conversion and account operations, plus a client that consumes it through a stub generated from the WSDL with wsimport.
SOAP
Protocol
JAX-WS
Stack
3
Operations
WSDL stub
Client
Approach
Publish a standalone JAX-WS endpoint, then consume it via contract-first stubs generated from the WSDL
Tech Stack
Java 17JAX-WS (jaxws-rt)SOAP / WSDLwsimportMaven
Keywords
SOAPJAX-WSWSDLwsimportWeb ServicesJava
Deep Dive
A classic SOAP / WSDL exercise: a banking service published as a standalone JAX-WS endpoint, and a separate client that talks to it through contract-first generated stubs.
Structure
microbank-soap-service/ → publishes the @WebService Endpoint on :9090
└── service/MicroBank → toMAD, getAccount, getAccounts
└── entities/Account
microbank-soap-client/ → BankWSClient
└── proxy/ → classes generated from the WSDL (wsimport)
Operations (@WebService BankWS)
| Operation | Param | Returns | Description |
|---|---|---|---|
| toMAD | double euroAmount | double | EUR → MAD conversion (×15) |
| getAccount | int code | Account | one account (random balance) |
| getAccounts | — | List<Account> | all accounts |
Workflow
- ▸Publish the service:
mvn exec:java -Dexec.mainClass=…BankWSApp - ▸Generate the client stub from the live WSDL:
wsimport -keep -p …proxy http://localhost:9090/?wsdl - ▸Run the client to invoke the remote operations
The build was modernized: swapped the wrong jaxws-maven-plugin for jaxws-rt, aligned to Java 17, flattened the layout.