Author: veithen
Date: Sun Oct 12 09:46:00 2008
New Revision: 703845
URL: http://svn.apache.org/viewvc?rev=703845&view=rev
Log:
Mail transport: Make sure that non textual attachements are sent with base64
transfer encoding instead of binary. This fix uses the extension introduced in
WSCOMMONS-390.
Modified:
webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportSender.java
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/mail/MailTransportTest.java
Modified:
webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportSender.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportSender.java?rev=703845&r1=703844&r2=703845&view=diff
==============================================================================
---
webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportSender.java
(original)
+++
webservices/commons/trunk/modules/transport/modules/mail/src/main/java/org/apache/axis2/transport/mail/MailTransportSender.java
Sun Oct 12 09:46:00 2008
@@ -238,6 +238,10 @@
throws AxisFault, MessagingException, IOException {
OMOutputFormat format = BaseUtils.getOMOutputFormat(msgContext);
+ // Make sure that non textual attachements are sent with base64
transfer encoding
+ // instead of binary.
+
format.setProperty(OMOutputFormat.USE_CTE_BASE64_FOR_NON_TEXTUAL_ATTACHMENTS,
true);
+
MessageFormatter messageFormatter =
BaseUtils.getMessageFormatter(msgContext);
if (log.isDebugEnabled()) {
Modified:
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/mail/MailTransportTest.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/mail/MailTransportTest.java?rev=703845&r1=703844&r2=703845&view=diff
==============================================================================
---
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/mail/MailTransportTest.java
(original)
+++
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/mail/MailTransportTest.java
Sun Oct 12 09:46:00 2008
@@ -34,10 +34,9 @@
public static TestSuite suite() throws Exception {
ManagedTestSuite suite = new ManagedTestSuite(MailTransportTest.class);
- // SwA doesn't work because attachments are sent with
"Content-Transfer-Encoding: binary"
- // and mail servers don't like that.
- // TODO: this could be fixed with the enhancement introduced by
WSCOMMONS-390
- suite.addExclude("(test=AsyncSwA)");
+ // SwA doesn't work with the mock client because attachments are sent
with
+ // "Content-Transfer-Encoding: binary" and mail servers don't like
that.
+ suite.addExclude("(&(test=AsyncSwA)(client=javamail))");
// There seems to be a problem with Sun's IMAP client or GreenMail's
IMAP server
// in this particular case:
suite.addExclude("(&(protocol=imap)(|(test=AsyncSwA)(&(test=EchoXML)(messageType=SOAP12))))");