Skip to content

Spring Web Services 4.1.0 RC1 Release Notes

Stéphane Nicoll edited this page Apr 18, 2025 · 1 revision

Spring Web Services 4.1.0-RC1 Release Notes

Upgrading from Spring Web Services 4.1

WsConfigurer for MethodArgumentResolvers and MethodReturnValueHandlers

The callback to add MethodArgumentResolver and MethodReturnValueHandler instance has changed. Previously addArgumentResolvers and addReturnValueHandlers were invoked with an empty list. They are now invoked with the default argument resolvers and return value handlers, respectively.

This is backward compatible as custom instances were added after the default. However, clearing the list means defaults are removed as well.

Minimum Requirements Changes

None.

New and Noteworthy

Order MethodArgumentResolvers and MethodReturnValueHandlers in WsConfigurer

MethodArgumentResolver and MethodReturnValueHandler instances can now be ordered according to the defaults. Adding an instance before the defaults makes sure that it is considered before the defaults.

Support for Configuring Arbitrary WSS4J Options

Wss4jSecurityInterceptor allows any WSS4J options to be specified on its internal handler, see setWsHandlerOption. This provides more flexibility in configuring the handler, without the need of adding more methods to Wss4jSecurityInterceptor.

More Flexible HTTP Message Sender

HttpComponents5MessageSender has now a companion class for when an HttpClient is provided as-is. Creating a SimpleHttpComponents5MessageSender with your custom client avoids the additional configuration options that HttpComponents5MessageSender provides.

The HttpClient can be configured using HttpComponents5ClientFactory that provides additional callbacks for advanced configuration. Once the factory is initialized with your customizations, you can create a WebServiceMessageSender by providing the factory to SimpleHttpComponents5MessageSender.

Here is an example configuring NTLM authentication whilst using the high-level customizations.

HttpComponents5ClientFactory factory = HttpComponents5ClientFactory.withDefaults();
factory.setConnectionTimeout(Duration.ofMillis(3000));
factory.addClientBuilderCustomizer(builder -> {
    BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider();
    credentialsProvider.setCredentials(new AuthScope(HOST_IP, HOST_PORT),
            new NTCredentials("user", "pass".toCharArray(), null, "domain"));
    builder.setDefaultCredentialsProvider(credentialsProvider);
    builder.setDefaultAuthSchemeRegistry(RegistryBuilder.<AuthSchemeFactory>create()
            .register(AuthSchemes.NTLM, new NTLMSchemeFactory())
            .build());
});
SimpleHttpComponents5MessageSender messageSender = new SimpleHttpComponents5MessageSender(factory);

Dependency Upgrades

Spring Web Services 4.1.0-RC1 moves to new versions of several Spring projects:

Third-party dependencies have also been updated, some of the more noteworthy of which are the following:

*

Miscellaneous

Apart from the changes listed above, there have also been lots of minor tweaks and improvements including:

*

Deprecations in Spring Web Services 4.1.0-M1