ffang opened a new pull request, #3598: URL: https://github.com/apache/cxf/pull/3598
AttachmentOutInterceptor replaces the SOAP Content-Type with the multipart wrapper and marks the message as already processed, so a retransmitted message was sent without its attachments, or with a nested multipart, both when it was resent from memory and when it was recovered from the RMStore. In-memory path: - Save the bare SOAP Content-Type (SAVED_CONTENT_TYPE) before AttachmentOutInterceptor replaces it - On resend, clear ATTACHMENT_OUT_CHECKED and the AttachmentSerializer content and restore the saved Content-Type, so the multipart is rebuilt correctly Persisted path (PersistenceUtils): - encodeRMContent writes the root part with the SOAP Content-Type instead of the multipart one, keeps the root part encoding, and treats an empty attachment collection as no attachments - decodeRMContent restores the root Content-Type from the stored message - For inbound (destination) messages the root type is taken from ATTACHMENT_PART_HEADERS, with the charset stripped - The root type is never a multipart type: if it cannot be determined, fall back to text/xml with a warning so a multipart is never nested - The root part of a captured MTOM message is stored as an XOP part, and decodeRMContent unwraps the SOAP type from an XOP root part and enables MTOM, so a recovered MTOM message is retransmitted as an XOP package Tests: - PersistenceUtilsTest: round trips, SOAP 1.2 action and charset handling, inbound path, missing root type, encoding, MTOM/XOP round trips - RetransmissionAttachmentTest: SwA and MTOM retransmission, and retransmission of SwA and MTOM messages recovered from the client store after a restart - ServerAttachmentRecoveryTest: an inbound message with an attachment that could not be delivered is persisted by the destination and redelivered with its attachment after a server restart - The recovery tests use their own in-memory database per test, as an in-memory HSQLDB database lives as long as the JVM -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
