URL-encoded content ID for MTOM attachments causes problems with web service clients
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.3.3
- JBossWS-CXF
Issue
-
After updating from EAP 6.2.3 to 6.3.3, we noticed that the content-id that is generated for MTOM attachments returned by our web service has changed. It now additionally contains the
http://prefix to the namespace. -
This change causes problems with certain web service clients that do not take into account that the content-id in the SOAP body is URL-encoded ("...@http%3A%2F%2F...") , whereas the following content-id MIME header is written like
...http://.... -
A concrete example is SoapUI 5.0.0, which fails to expand the MTOM attachment prior to schema validation (and as a result, reports a schema compliance violation).
The issue is similar to this, Content from issues.apache.org is not included.Content from issues.apache.org is not included.https://issues.apache.org/jira/browse/CXF-2669.
The probable commit responsible for this change in behavior is the following:
Content from github.com is not included.Content from github.com is not included.https://github.com/apache/cxf/commit/5f89d20234c3786d354f8ab1f2b4ee1f9a421490.
- We have a great number of web service clients using different technologies and do not want to risk breaking compatibility with existing services. Is it possible to override the content-id without using a performance-degrading handler/interceptor, and without having to redesign our JAX-WS-centered web service code ?
Resolution
Apply JBoss EAP 6.4 Cumulative Patch (CP) 6
Root Cause
[BZ-1245706] URL-encoded content ID for MTOM attachments causes problems with web service clients](https://bugzilla.redhat.com/show_bug.cgi?id=1245706)
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.