Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54522104F0 for ; Sun, 28 Dec 2014 11:54:13 +0000 (UTC) Received: (qmail 44768 invoked by uid 500); 28 Dec 2014 11:54:13 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 44731 invoked by uid 500); 28 Dec 2014 11:54:13 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 44722 invoked by uid 99); 28 Dec 2014 11:54:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 28 Dec 2014 11:54:13 +0000 Date: Sun, 28 Dec 2014 11:54:13 +0000 (UTC) From: "Willem Jiang (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CAMEL-8181) Default SOAPMessage to String Converter does not handle Multiparts as expected MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang resolved CAMEL-8181. --------------------------------- Resolution: Won't Fix Updated the wiki page with thanks to David. > Default SOAPMessage to String Converter does not handle Multiparts as expected > ------------------------------------------------------------------------------ > > Key: CAMEL-8181 > URL: https://issues.apache.org/jira/browse/CAMEL-8181 > Project: Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.14.1 > Reporter: David Atkins > Assignee: Willem Jiang > Priority: Minor > > The default SOAPMessage to String converter in org.apache.camel.component.cxf.converter.CxfConverter uses the SoapMessage#writeTo method to convert it to a String. But when receiving a multipart (e.g. when using MTOM) this provides all of the message parts, instead of just the message body as expected, resulting in something like the following appearing on the Exchange Body: > {code} > ------=_Part_0_715152323.1390739632718 > Content-Type: text/xml; charset=utf-8 > > > > > > ? > ? > ? > ? > ? >
?
> ? > ? >
>
>
> ------=_Part_0_715152323.1390739632718 > Content-Type: application/octet-stream; name=error.log > Content-Disposition: attachment; name="error.log"; filename="error.log" > Content-Transfer-Encoding: binary > Content-ID: > file content here > {code} > I can't think of a useful use case for having the message in this format, especially as the attachments are correctly added to the Exchange's Attachment Map > I believe the converter should only convert the initial Part to a String, rather than the whole message. Something like this: > {code} > return XMLUtils.toString(new DOMSource(message.getSOAPPart())); > {code} > I'll try and find some time to create a patch next week > Note that this is documented in the following Redhat support case : https://access.redhat.com/solutions/740703 from a customer support issue I raised a while back -- This message was sent by Atlassian JIRA (v6.3.4#6332)