-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spring-ws-test - IllegalArgumentException during request comparison #1193
Comments
changes between saaj-impl 1.5.2 and 1.5.3 I think it is due to the new cloning behavior. There are also notable differences with v1.5.2 and 1.5.3 in the type of |
I ran into the exact same issue |
same for me |
Workaround:
|
Is there a solution to this problem today other than using saaj-impl:jar:1.5.2 |
The SoapEnvelopeDiffMatcher was untested at the MockWebServiceServer level. Upgrading to xmlunit2 fixed the issue. Related: spring-projects#1193
I've patched this issue so things should run properly. It's currently working for Spring WS 4.0.1-SNAPSHOT, which is picked up by Spring Boot 3.0.2-SNAPSHOT. Spring Boot 2.4 (as mentioned above) hasn't been supported since November 2021, so it won't be visible there. I'll investigate whether this is a candidate for backporting to Spring WS 3.1, which is supported by Spring Boot 2.7. (All version of Spring Boot before 2.7 are no longer supported). |
Implement newer versions of PayloadDiffMatcher and SoapEnvelopematcher based on XMLUnit 2. Deprecate the prior versions of these supporting types so they can be removed in a future release. XMLUnit 2 eases the testing of MockWebServiceServer. Resolves #1193.
Backported to |
I am happy to confirm that the error is gone with Spring Boot 2.7.7, saaj-impl 1.5.3 and spring-ws 3.1.5-SNAPSHOT. |
I'm still facing this issue using encryption, while i run it on Intellij it works correctly, but when i dockerize it, returns: |
Your docker container is using spring-ws-core-3.1.4.jar not 3.1.5 |
I'm updating a Spring Boot 2.7 project to Spring Boot 3.1.2, and the issue was not present initially, but is there when updating Spring Boot
The thing is that it's not fixable by using saaj-impl 1.5.2 as it's not compatible with 3.X: the following stacktrace occurs if I patch it to use 1.5.2 (the SAAJMetaFactory class is absent from this old version)
I tried saaj-impl 3.0.2, 3.0.1 and 3.0.0 but the |
I have exactly the same problem. Any ideas how to fix this issues? saaj-impl 3.0.2 |
When the XMLUnit2 upgrade was done (commit: c39d3d1) this import was forgotten. It causes the bug reported with XMLUnit1 (issue: spring-projects#1193) to still be present when using `ResultMatchers#soapEnvelope(Source)`. For more infos: spring-projects#1193 (comment) Here comes the fix for it.
@PhilippKemkes Hey, I did have a fix now! So, in fact, there are 2 possible fixes:
To apply the temporary workaround, just follow these steps:
Enjoy 😄 |
When the XMLUnit2 upgrade was done (commit: c39d3d1) this import was forgotten. It causes the bug reported with XMLUnit1 (issue: #1193) to still be present when using `ResultMatchers#soapEnvelope(Source)`. For more infos: #1193 (comment) See #1370. Related: #1193.
With
com.sun.xml.messaging.saaj:saaj-impl:1.5.3
(which is included in spring-boot-starter-web-services:2.4.5), the comparison of expected and actual request throws anIllegalArgumentException
for us:This does not occur with
saaj-impl:1.5.2
.I've created a relatively minimal test to reproduce the issue: https://github.com/MHajoha/spring-ws-test-bug-repro
The text was updated successfully, but these errors were encountered: