[
https://issues.apache.org/jira/browse/CXF-6431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Akitoshi Yoshida resolved CXF-6431.
-----------------------------------
Resolution: Fixed
The corrected behavior is as follows:
Case 1: No MTOM using SOAP 1.2
P Content-Type: multipart/related; type="application/soap+xml";
boundary="uuid:936da01f-9abd-4d9d-80c7- 02af85c822a8";
start="<[email protected]>"; start-info="application/soap+xml;
action=\"urn:test:greetMe\""
E Content-Type: application/soap+xml; charset=UTF-8; action="urn:test:greetMe"
Case 2: No MTOM using SOAP 1.1
P Content-Type: multipart/related; type="text/xml";
boundary="uuid:936da01f-9abd-4d9d-80c7- 02af85c822a8";
start="<[email protected]>"; start-info="text/xml"
E Content-Type: text/xml; charset=UTF-8
Case 3: MTOM using SOAP 1.2
P Content-Type: multipart/related; type="application/xop+xml";
boundary="uuid:936da01f-9abd-4d9d-80c7- 02af85c822a8";
start="<[email protected]>"; start-info="application/soap+xml;
action=\"urn:test:greetMe\""
E Content-Type: application/xop+xml; charset=UTF-8;
type="application/soap+xml; action=\"urn:test:greetMe\""
Case 4: MTOM using SOAP 1.1
P Content-Type: multipart/related; type="application/xop+xml";
boundary="uuid:936da01f-9abd-4d9d-80c7- 02af85c822a8";
start="<[email protected]>"; start-info="text/xml"
E Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
------
References
- RFC2387 The MIME Multipart/Related Content-type
https://tools.ietf.org/html/rfc2387#section-2
states the type parameter in the multipart header is the media type
"type/subtype" of the root part.
- XML-binary Optimized Packaging, section 4.1,
http://www.w3.org/TR/xop10/#mime_xop_packages and errata#x34
http://www.w3.org/2000/xp/Group/xmlp-rec-issues.html#x34 state the start-info
prameter at the package's media type must contain the content type associated
with the content's xml serialization, namely the type parameter of the root
part and this type parameter at the rooat part is specified to include
parameters as appropriate.
> Attachment serialization does not conform to the relevant specs
> ---------------------------------------------------------------
>
> Key: CXF-6431
> URL: https://issues.apache.org/jira/browse/CXF-6431
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.0.5
> Reporter: Akitoshi Yoshida
> Assignee: Akitoshi Yoshida
> Fix For: 3.1.1, 3.0.6, 2.7.17
>
>
> This was reported in
> http://cxf.547215.n5.nabble.com/SwA-Wrong-Content-Type-of-root-part-td5757786.html
> The original issue that was reported in the above message is about the wrong
> type value set for the SOAP envelope part in a non-MTOM multipart message
> under SOAP 1.2.
> While looking at the code, there seem to be other inconsistency as well.
> To illustrate these issues, the current behavior is shown below, where P
> refers to the package's content-type and E refers to the envelope's
> content-type:
> Case 1: No MTOM using SOAP 1.2
> P Content-Type: multipart/related; type="application/soap+xml";
> action="urn:test:greetMe"; boundary="uuid:936da01f-9abd-4d9d-80c7-
> 02af85c822a8"; start="<[email protected]>";
> start-info="application/soap+xml"; action="urn:test:greetMe"
> E Content-Type: text/xml; charset=UTF-8; type="application/soap+xml";
> action="urn:test:greetMe"
> Case 2: No MTOM using SOAP 1.1
> P Content-Type: multipart/related; type="text/xml";
> boundary="uuid:936da01f-9abd-4d9d-80c7- 02af85c822a8";
> start="<[email protected]>"; start-info="text/xml"
> E Content-Type: text/xml; charset=UTF-8; type="text/xml"
> Case 3: MTOM using SOAP 1.2
> P Content-Type: multipart/related; type="application/xop+xml";
> boundary="uuid:936da01f-9abd-4d9d-80c7- 02af85c822a8";
> start="<[email protected]>"; start-info="application/soap+xml";
> action="urn:test:greetMe"
> E Content-Type: application/xop+xml; charset=UTF-8;
> type="application/soap+xml"; action="urn:test:greetMe"
> Case 4: MTOM using SOAP 1.1
> P Content-Type: multipart/related; type="application/xop+xml";
> boundary="uuid:936da01f-9abd-4d9d-80c7- 02af85c822a8";
> start="<[email protected]>"; start-info="text/xml"
> E Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
> The issues
> 1. the content-type of E in Case 1 is wrong (the reported issue)
> 2. the type parameter in E for non-MTOM cases 1 and 2 are not needed
> 3. the start-info parameter for MTOM SOAP 1.2 case 3 does not conform to the
> Mtom spec http://www.w3.org/TR/2005/REC-xop10-20050125/. According to this
> spec, the action parameter is part of the start-info value and not a separate
> property. This is also relevant for Case 1 which generates the action
> property at P's content-type.
> We should fix this behavior but regarding issue 3, there is some concern that
> we might need to provide an option to fallback to the old incorrect behavior.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)