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

JAX-WS Provider returning JAXBSource with attachment

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.1
    • Component/s: Bus, Core, JAX-WS Runtime
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I am trying to return a JAXBSource payload from a JAX-WS Provider;
      the JAXBSource's Marshaller has a custom AttachmentMarshaller
      that puts the attachments into the MessageContext's OUTBOUND_MESSAGE_ATTACHMENTS Map

      the problem is that the attachments are not included in the response multipart SOAP message

      however, if I transform the same JAXBSource result payload
      into a DOMSource, and return this DOMSource from the Provider#invoke() method,
      then the attachments are included in the response multipart SOAP message!

      I think the problem is that
      when I return the JAXBSource
      the attachments are added "too late"
      (when the JAXBSource is processed by the CXF runtime, outside of the Provider#invoke() method)
      to the MessageContext

      am I right, if I think that this means
      that CXF currently does not support
      JAXBSource payload results with attachments?

      which means that we have to build an unnecessary DOM tree in these cases...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dkulp Daniel Kulp
                Reporter:
                zsolt.szloboda Zsolt Szloboda
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: