Return to site

☕🍃 SPRING WEB SERVICES 5.1 RC1:3️⃣ Essential Changes for JAVA Developers

SOAP isn't dead. It's getting safer, smarter, and observable!

· spring

🔸 TLDR

Stéphane Nicoll announces two new Spring Web Services releases, available on Maven Central and above all:

▪️ Spring WS 5.1.0-RC1: Release candidate bringing Micrometer observability, typed SOAP headers, secured fault responses, WSDL policies, and Spring Framework 7.1 integration.Here are the 3️⃣ changes worth knowing! 👇

🔸 TOP 3️⃣ CHANGES

1️⃣ 📊 MICROMETER OBSERVABILITY

Spring WS now supports Micrometer's Observation API to collect metrics and tracing spans for SOAP exchanges.

Client and server observations are named soap.client.requests and soap.server.requests. Instrumentation requires an ObservationRegistry.

Java snippet:

webServiceTemplate.setObservationRegistry(
     observationRegistry
 );

#Micrometer #Observability

2️⃣ 📦 TYPED SOAP HEADERS WITH @SoapHeader

SOAP headers can now be unmarshalled directly into custom Java objects or lists using a configured Unmarshaller. No more manual extraction from SoapHeaderElement!

Java snippet:

public void handle(
     @RequestPayload OrderRequest request,
     @SoapHeader("{http://samples}security")
     Credentials credentials ) {
     // Use the unmarshalled credentials
 }

#SOAP #JAXB

3️⃣ 🔐 WS-SECURITY FOR SOAP FAULTS

SOAP fault responses can now be secured and validated like normal responses. Useful when enterprise clients require security headers even when requests fail.

Java snippet:

// Server-side interceptor serverInterceptor.setSecureFault(true);
// Client-side interceptor clientInterceptor.setValidateFault(true);

Both options are disabled by default.

#SpringSecurity #WSSecurity

🔸 TAKEAWAYS

▪️ SOAP remains relevant for contract-first enterprise integrations.

▪️ Observability makes SOAP services easier to monitor and troubleshoot.

▪️ Typed headers simplify endpoint implementation and reduce boilerplate.

Thanks to Stéphane Nicoll and the Spring team for these updates! 🍃

🔸 OFFICIAL RELEASE NOTES

Spring WS 5.1.0-RC1:

💬 Are you still maintaining SOAP services in your Java applications, or have you migrated entirely to REST and gRPC?

#Java #Spring #SpringFramework #SpringBoot #SpringWebServices #SOAP #WebServices #Microservices #JavaDevelopment

Go further with Java certification:

Java👇

Spring👇

SpringBook👇

JavaFullstackBook👇