Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 66011 invoked from network); 7 Jun 2010 22:20:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jun 2010 22:20:38 -0000 Received: (qmail 18042 invoked by uid 500); 7 Jun 2010 22:20:38 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 17870 invoked by uid 500); 7 Jun 2010 22:20:38 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 17862 invoked by uid 99); 7 Jun 2010 22:20:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 22:20:38 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 22:20:35 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o57MKEtX019460 for ; Mon, 7 Jun 2010 22:20:14 GMT Message-ID: <16099182.14061275949214001.JavaMail.jira@thor> Date: Mon, 7 Jun 2010 18:20:13 -0400 (EDT) From: "Phil Adams (JIRA)" To: java-dev@axis.apache.org Subject: [jira] Updated: (AXIS2-4733) Incorrect content-type used in serialized SOAP message for an XML document attachment In-Reply-To: <6707093.14021275949033828.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-4733?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Adams updated AXIS2-4733: ------------------------------ Attachment: patch.txt Attaching patch.txt which contains the "svn diff" of my changes... > Incorrect content-type used in serialized SOAP message for an XML documen= t attachment > -------------------------------------------------------------------------= ------------ > > Key: AXIS2-4733 > URL: https://issues.apache.org/jira/browse/AXIS2-4733 > Project: Axis2 > Issue Type: Bug > Components: jaxws > Affects Versions: nightly > Reporter: Phil Adams > Attachments: patch.txt > > > When using the SAAJ API, a user could add an AttachmentPart to the SOAPMe= ssage and explicitly set the content type of the attachment by calling Atta= chmentPart.setContentType(). This causes the AttachmentPart to maintain t= he user-specified content type separate from the content type of the underl= ying DataHandler. Within the jaxws module, the DataHandler instance is s= aved away and then used to serialize the SOAP message, but we don't maintai= n the user-specified content type. Consequently, the DataHandler's content= type is then used unconditionally when serializing the MIME part in the ou= tput message. Recently, the DataHandler class (or more likely one of it= s underlying DataSource implementations) has started using a default conten= t type of "application/xml" for an XML document attachment. This has caus= ed a failure in a Java EE CTS testcase, as the testcase explicitly sets the= content type of the AttachmentPart to "text/xml" and expects that to be us= ed in the outgoing request message. I'm including a patch which fixes thi= s problem by introducing a new "WrappedDataHandler" class which maintains t= he content type from the AttachmentPart as well as the DataHandler instance= . This allows for the correct content type to be used when serializing th= e message... --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org