Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6431

Attachment serialization does not conform to the relevant specs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.5
    • 3.1.1, 3.0.6, 2.7.17
    • Core
    • None
    • Unknown

    Description

      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="<root.message@cxf.apache.org>"; 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="<root.message@cxf.apache.org>"; 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="<root.message@cxf.apache.org>"; 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="<root.message@cxf.apache.org>"; 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.

      Attachments

        Issue Links

          Activity

            People

              ay Akitoshi Yoshida
              ay Akitoshi Yoshida
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: