117 Commits

Author SHA1 Message Date
Stéphane Nicoll
e490948b10 Merge branch '4.0.x'
Closes gh-1551
2025-04-21 17:50:05 +02:00
Stéphane Nicoll
03b5f0057f Harmonize visibility of test classes and methods
Closes gh-1550
2025-04-21 17:36:00 +02:00
Stéphane Nicoll
c4ccfeecb6 Merge branch '4.0.x'
Closes gh-1538
2025-04-19 11:56:44 +02:00
Stéphane Nicoll
b98055139a Fix compilation warnings 2025-04-19 11:41:13 +02:00
Stéphane Nicoll
1c5543a199 Merge branch '4.0.x'
Closes gh-1529
2025-04-18 11:52:26 +02:00
Stéphane Nicoll
772549084e Harmonize suffix of test classes
Closes gh-1528
2025-04-18 11:40:44 +02:00
Stéphane Nicoll
27a21f8367 Merge branch '4.0.x'
Closes gh-1527
2025-04-16 15:13:49 +02:00
Stéphane Nicoll
f58db47ba4 Fix error logging in client-side validation
Closes gh-1144
2025-04-16 15:11:04 +02:00
Stéphane Nicoll
72d79d19db Add more flexible registration of DefaultMethodEndpointAdapter
This commit updates WsConfigurer to get a callback with the list of
default method argument resolvers and return value handlers. Previously,
the callback only allowed to add custom instances and these were added
after the defaults.

Closes gh-1080
2025-04-10 15:22:36 +02:00
Stéphane Nicoll
80f8d61024 Only log the exception if is it resolved
This commit improves AbstractEndpointExceptionResolver to only invoke
the logException method for an exception that has been resolved. To
help with chaining them, a CompositeEndpointExceptionResolver has been
introduced. If no resolvers were able to resolve the exception, the
last instance will then log the exception.

Closes gh-736
2025-04-08 14:33:39 +02:00
Stéphane Nicoll
d3454c5edc Improve creation of HttpClient with HttpComponents5ClientFactory
This commit improves HttpComponents5ClientFactory so that it is easier
to apply custom configuration to the HttpClient it creates.

Closes gh-1035
2025-04-08 14:12:40 +02:00
Stéphane Nicoll
f250abb0cf Simplify HttpComponents5MessageSender
Previously, HttpComponents5MessageSender can be configured to use both
a custom HttpClient or configure one using a number of convenient
properties. This setup creates an odd arrangement where calling those
convenient methods once an HttpClient is set throws an exception as
the implementation supports one or the other.

This commit moves the first use case in a simple implementation that
only accepts a custom HttpClient or the state of
HttpComponents5ClientFactory for convenience and discoverability.

Specifying an HttpComponents5MessageSender is deprecated as a result.

Closes gh-1519
2025-04-08 13:21:16 +02:00
Stéphane Nicoll
cf9295b887 Invoke ClientInterceptor#afterCompletion once per request
This commit reviews how afterCompletion is invoked. First of all, any
exception thrown by an interceptor does not bubble up the stack to give
a chance for other interceptors to clean things up.

Then, rather than calling afterCompletion before handling a fault, an
error, or the response body, it is invoked after. This gives a chance
to any exception to break the flow and handle the completion in the
catch block.

Tests have been added to ensure that the callback is only invoked once.

Closes gh-1054
2025-04-08 10:52:59 +02:00
Stéphane Nicoll
6dcf78d454 Merge branch '4.0.x'
Closes gh-1517
2025-04-06 12:44:22 +02:00
Stéphane Nicoll
daccb0db6d Allow SmartEndpointInterceptor to be added as regular interceptor
Previously, only SmartEndpointInterceptor instances declared as bean
were considered by AbstractEndpointMapping. Given that it extends from
EndpointInterceptor, this meant that adding them using the regular
setEndpointInterceptor mean they were not considered as such, that is
added irrespective of their `shouldIntercept` contract.

This commit considers both list as holding SmartEndpointInterceptor
instances. As a result, these can now be added using regular hook
points, such as WsConfigurer.

Closes gh-1130
2025-04-06 12:44:02 +02:00
Stéphane Nicoll
fa46f47f38 Merge branch '4.0.x'
Closes gh-1513
2025-03-27 18:49:06 +01:00
Stéphane Nicoll
611eb9b98d Use provided HttpClient consistently
This commit harmonizes the behavior of HttpComponents5MessageSender to
reuse a provided HttpClient, be it provided via constructor or property.

Closes gh-1512
2025-03-27 18:48:49 +01:00
Stéphane Nicoll
60942af529 Reinstantiate support for Apache Axiom
This commit restores support for Apache Axiom now that it supports
Jakarta. This commit tries to restore the code that was deleted as-is,
without reviewing the deprecations.

See gh-1454
2025-03-14 16:19:47 +01:00
Stéphane Nicoll
ef4e79b600 Stop relying on getLastModified
This commit delegates the check of validating that a request needs to
be processed to the handler themselves. As a result,
MessageDispatcherServlet is no longer implementing getLastModified.

An advantage of this change is that the server now handles
"If-Not-Modified" request headers.

Closes gh-1470
2025-03-11 16:03:21 +01:00
Stéphane Nicoll
122def7e21 Fix split package between spring-ws-support and spring-ws-core
This commit moves the classes from the o.s.ws.transport.http and
o.s.ws.transport.support packages from spring-ws-support to
spring-ws-core. It turns out these classes don't bring extra
dependencies, which make the move quite straightforward.

Closes gh-1202
2025-03-11 14:52:22 +01:00
Stéphane Nicoll
1213ab4da8 Merge branch '4.0.x'
Closes gh-1498
2025-03-11 14:34:27 +01:00
Stéphane Nicoll
eeccbce5b8 Harmonize code format
Closes gh-1496
2025-03-11 14:31:03 +01:00
Stéphane Nicoll
a6ecd7b60d Merge branch '4.0.x'
Closes gh-1492
2025-03-10 15:29:37 +01:00
Stéphane Nicoll
2744867894 Remove dependency on Spring HATEOAS
Closes gh-1491
2025-03-10 15:29:02 +01:00
Stéphane Nicoll
0929ef64ff Remove deprecated methods
This commit removes method that were deprecated quite some time ago
as part of the 2.0 line:

- `FaultAwareWebServiceConnection#setFault(boolean)`
- Commons HttpClient v3
- EhCache v2

Closes gh-1321
2025-03-10 15:03:57 +01:00
Stéphane Nicoll
0cdb728b3f Remove deprecated endpoint base classes
This deprecates the programming model of extending from base endpoint
class in favor of the `@Endpoint` programming model introduced in
Spring-WS 2.0.

This also removes any reference <sws:marshalling-endpoints/> and
<sws:xpath-endpoints/> that are no longer part of the XSD since 2.0
as well.

Closes gh-1487
2025-03-10 14:03:46 +01:00
Stéphane Nicoll
7a97414400 Merge branch '4.0.x' 2025-03-10 13:27:12 +01:00
Stéphane Nicoll
b2b96ee0fc Polish properties format 2025-03-10 13:26:39 +01:00
Stéphane Nicoll
d5a4c9219b Deprecate WsConfigurerAdapter
Closes gh-1480
2025-03-10 08:13:12 +01:00
Stéphane Nicoll
57e3880ce3 Add utility to create a org.xml.sax.XMLReader
Closes gh-1471
2025-03-08 12:22:15 +01:00
Stéphane Nicoll
00e1e68062 Mark private classes final
See gh-1479
2025-03-07 15:36:50 +01:00
Stéphane Nicoll
360f52379b Add new line between header and package statement
See gh-1479
2025-03-07 15:36:50 +01:00
Stéphane Nicoll
60ec66ce79 Add 'this.' for field access
See gh-1479
2025-03-07 15:36:49 +01:00
Stéphane Nicoll
bc0168f4b2 Format XML code consistently
In particular, this commit uses tabs consistently, rather than spaces.
2025-03-06 18:20:12 +01:00
Stéphane Nicoll
d0800f1ae6 Optimize imports 2025-03-05 10:11:44 +01:00
Stéphane Nicoll
a395d8215c Clean logging configuration in tests
Use log4j (2) consistently and remove old log4j 1 configuration.

Closes gh-1476
2025-03-04 17:56:22 +01:00
Stéphane Nicoll
3a60f3638e Polish 2025-02-27 15:32:54 +01:00
Stéphane Nicoll
5a1e5028cb Adapt to deprecation 2025-02-27 09:50:04 +01:00
Andy Wilkinson
fb4ab827c5 Name test classes consistently
Closes gh-1468
2025-02-26 16:02:07 +01:00
Stéphane Nicoll
da47205e58 Review Javadoc
Closes gh-1467
2025-02-26 15:28:51 +01:00
Andy Wilkinson
883c110870 Use Jetty 12 for testing as it's Jakarta EE 10 compatible
Closes gh-1465
2025-02-24 16:43:52 +01:00
Stéphane Nicoll
00aca5b677 Harmonize copyright headers 2025-02-19 14:34:27 +01:00
Stéphane Nicoll
fdede99aa0 Format code with spring-javaformat
This commit configures the build to use spring-javaformat and makes a
first pass to format the code of the project. As part of this, imports
have been optimized, and the license header has been harmonized.

Closes gh-1458
2025-02-19 14:17:06 +01:00
Stéphane Nicoll
03864b7dfb Revert test in fe43f88
This commit reverts the test that has been introduced to validate the
change in fe43f88. This test requires Spring Boot to operate and we
cannot rely on that.

See gh-1435
2025-02-18 18:24:54 +01:00
Corneil du Plessis
fe43f881c1 Fix problem with BeanPostProcessing (#1447)
Change endpoint mapping from BeanPostProcessor to SmartInitializingSingleton
Added Test and updated test.sh to invoke with separate profile.
Fixes #1435
2024-12-18 16:13:47 +02:00
Greg L. Turnquist
6ea7baebd2 Polishing.
See #1368.
2023-09-07 15:20:45 -05:00
Mikhail Putilov
3aaa77e08c Align Content-Type headers with Spring Framework policies for HttpClient 5.
Some tools expect a non-blank Content-Type header from HttpEntity during execution.

Resolves #1368.
2023-09-07 15:19:55 -05:00
hduelme
3ddbc2314a Generify ClientHttpRequestMessageSenderIntegrationTest.
Resolves #1362.
2023-07-14 14:52:41 -05:00
Greg L. Turnquist
8dbb04d0d1 Polishing.
See #1357.
2023-05-23 13:45:57 -05:00
Lars Uffmann
24b466a0e1 Enhance HttpComponents5MessageSender.
* The clientFactory could be null, so this must be handled.
* AuthScope.ANY no longer exists, so we need a suitable value object to take its place.
* Polish documentation and javadocs to support the community.

Resolves #1357.
2023-05-23 13:45:42 -05:00