You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CXF-8977: Add support for MTOM Serialization Policy Assertion 1.1 - #1685
Add support for the W3C MTOM Serialization Policy Assertion 1.1 (WS-MTOMPolicy) alongside the existing 1.0 assertion (OptimizedMimeSerialization from http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization).
This allows CXF to process WSDL/policy documents that use the newer MTOM 1.1 policy namespace, which uses the {http://www.w3.org/2007/08/soap12-mtom-policy}MTOM element instead of the older {http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization}OptimizedMimeSerialization element.
Changes
MetadataConstants: Add MTOM11_ASSERTION_QNAME constant for the W3C MTOM 1.1 namespace
MTOMAssertionBuilder: Register and build assertions for both MTOM 1.0 and 1.1 QNames
MTOMPolicyInterceptor: Refactor to handle both assertion types via extracted assertAssertion() method
MTOMPolicyInterceptorProvider: Register both assertion types
Tests
Add testRequiredMtom11 and testOptionalMtom11 tests mirroring the existing 1.0 tests
Add mtom11-policy.xml and mtom11-policy-optional.xml policy files using the W3C MTOM 1.1 namespace
Refactor setupServer() to accept a policy resource name instead of a boolean flag
I've reviewed this PR and it looks good overall. Clean, well-structured change that correctly adds support for the MTOM Serialization Policy Assertion 1.1 namespace (http://www.w3.org/2007/08/soap12-mtom-policy / MTOM element) alongside the existing 1.0 namespace (http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization / OptimizedMimeSerialization element).
What I did
Rebased onto current main — The branch was based on 4.0.4-SNAPSHOT (from 2024) and couldn't compile. Rebase was clean, no conflicts.
Fixed minor code style issue — Removed an extra blank line in MetadataConstants.java between the constant declarations and the private constructor.
Verified: All 133 tests in rt/ws/policy pass. Checkstyle is clean.
Review notes
The production code changes are clean and well-designed:
MetadataConstants — new MTOM11_ASSERTION_QNAME constant with correct W3C namespace
MTOMAssertionBuilder — correctly handles both QNames in KNOWN_ELEMENTS and build()
MTOMPolicyInterceptor — good refactoring to extract assertAssertion() as a reusable static method
MTOMPolicyInterceptorProvider — correctly registers both assertion types
Test coverage includes both required and optional variants of the MTOM 1.1 policy, mirroring the existing 1.0 tests
The new policy XML files correctly use the W3C MTOM 1.1 namespace
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Rebased onto current main, fixed a minor extra blank line in MetadataConstants. All tests pass, checkstyle clean. Clean and well-structured change.
gnodet
changed the title
CXF-8977: add support for MTOM Serialization Policy Assertion 1.1
CXF-8977: Add support for MTOM Serialization Policy Assertion 1.1
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add support for the W3C MTOM Serialization Policy Assertion 1.1 (WS-MTOMPolicy) alongside the existing 1.0 assertion (
OptimizedMimeSerializationfromhttp://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization).This allows CXF to process WSDL/policy documents that use the newer MTOM 1.1 policy namespace, which uses the
{http://www.w3.org/2007/08/soap12-mtom-policy}MTOMelement instead of the older{http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization}OptimizedMimeSerializationelement.Changes
MetadataConstants: AddMTOM11_ASSERTION_QNAMEconstant for the W3C MTOM 1.1 namespaceMTOMAssertionBuilder: Register and build assertions for both MTOM 1.0 and 1.1 QNamesMTOMPolicyInterceptor: Refactor to handle both assertion types via extractedassertAssertion()methodMTOMPolicyInterceptorProvider: Register both assertion typesTests
testRequiredMtom11andtestOptionalMtom11tests mirroring the existing 1.0 testsmtom11-policy.xmlandmtom11-policy-optional.xmlpolicy files using the W3C MTOM 1.1 namespacesetupServer()to accept a policy resource name instead of a boolean flagJIRA
CXF-8977