Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 89344 invoked from network); 7 May 2008 06:50:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 May 2008 06:50:27 -0000 Received: (qmail 46859 invoked by uid 500); 7 May 2008 06:50:28 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 46795 invoked by uid 500); 7 May 2008 06:50:28 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 46784 invoked by uid 99); 7 May 2008 06:50:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2008 23:50:28 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 May 2008 06:49:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B7DF223889B9; Tue, 6 May 2008 23:50:05 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r654008 - /cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java Date: Wed, 07 May 2008 06:50:04 -0000 To: commits@cxf.apache.org From: ffang@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080507065005.B7DF223889B9@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ffang Date: Tue May 6 23:50:03 2008 New Revision: 654008 URL: http://svn.apache.org/viewvc?rev=654008&view=rev Log: [CXF-1573]JBIDestinationOutputStream should copy attachments into NormalizedMessage to support outbound attachments Modified: cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java Modified: cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java?rev=654008&r1=654007&r2=654008&view=diff ============================================================================== --- cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java (original) +++ cxf/trunk/rt/transports/jbi/src/main/java/org/apache/cxf/transport/jbi/JBIDestinationOutputStream.java Tue May 6 23:50:03 2008 @@ -36,6 +36,7 @@ import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.io.CachedOutputStream; +import org.apache.cxf.message.Attachment; import org.apache.cxf.message.Message; public class JBIDestinationOutputStream extends CachedOutputStream { @@ -95,6 +96,13 @@ } } else { NormalizedMessage msg = xchng.createMessage(); + //copy attachments + if (inMessage.getAttachments() != null) { + for (Attachment att : inMessage.getAttachments()) { + msg.addAttachment(att.getId(), att + .getDataHandler()); + } + } msg.setContent(new DOMSource(doc)); xchng.setMessage(msg, "out");