cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r831611 - in /cxf/trunk: rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ systests/databinding/src/test/resources/
Date Sat, 31 Oct 2009 22:53:15 GMT
Author: bimargulies
Date: Sat Oct 31 22:53:15 2009
New Revision: 831611

URL: http://svn.apache.org/viewvc?rev=831611&view=rev
Log:
CXF-1706. Don't require explicit MTOM permission to accept MTOM in the one place that was
checking.

Modified:
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AbstractXOPType.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java
    cxf/trunk/systests/databinding/src/test/resources/mtomTestBeans.xml

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java?rev=831611&r1=831610&r2=831611&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/Base64Type.java
Sat Oct 31 22:53:15 2009
@@ -57,7 +57,6 @@
     
     @Override
     public Object readObject(MessageReader mreader, Context context) throws DatabindingException
{
-        boolean mtomEnabled = context.isMtomEnabled();
         XMLStreamReader reader = mreader.getXMLStreamReader();
 
         ByteArrayOutputStream bos = new ByteArrayOutputStream();
@@ -69,11 +68,7 @@
             }
             
             if (reader.isStartElement() && reader.getName().equals(AbstractXOPType.XOP_INCLUDE))
{
-                if (mtomEnabled) {
-                    return optimizedType.readMtoM(mreader, context);
-                } else {
-                    throw new DatabindingException("Unexpected element: " + reader.getName());
-                }
+                return optimizedType.readMtoM(mreader, context);
             }
 
             if (reader.isEndElement()) {

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AbstractXOPType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AbstractXOPType.java?rev=831611&r1=831610&r2=831611&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AbstractXOPType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/AbstractXOPType.java
Sat Oct 31 22:53:15 2009
@@ -44,7 +44,6 @@
 
 /**
  * Base class for MtoM types.
- * @author <a href="mailto:dan@envoisolutions.com">Dan Diephouse</a>
  */
 public abstract class AbstractXOPType extends AegisType {
     public static final String XOP_NS = "http://www.w3.org/2004/08/xop/include";

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java?rev=831611&r1=831610&r2=831611&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/mtom/ByteArrayType.java
Sat Oct 31 22:53:15 2009
@@ -31,7 +31,7 @@
 import org.apache.cxf.message.Attachment;
 
 /**
- * @author Dan Diephouse
+ * Byte arrays. Also handles MTOM.
  */
 public class ByteArrayType extends AbstractXOPType {
     public ByteArrayType(boolean useXmimeBinaryType, String expectedContentTypes) {
@@ -50,16 +50,6 @@
         copy(is, out);
         is.close();
         return out.toByteArray();
-        // }
-        // finally
-        // {
-        // DataSource dataSource = handler.getDataSource();
-        // if (dataSource instanceof AttachmentDataSource)
-        // {
-        // File attFile = ((AttachmentDataSource) dataSource).getFile();
-        // if (attFile != null) attFile.delete();
-        // }
-        // }
     }
 
     public static void copy(InputStream input, OutputStream output) throws IOException {

Modified: cxf/trunk/systests/databinding/src/test/resources/mtomTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/databinding/src/test/resources/mtomTestBeans.xml?rev=831611&r1=831610&r2=831611&view=diff
==============================================================================
--- cxf/trunk/systests/databinding/src/test/resources/mtomTestBeans.xml (original)
+++ cxf/trunk/systests/databinding/src/test/resources/mtomTestBeans.xml Sat Oct 31 22:53:15
2009
@@ -50,9 +50,7 @@
 		serviceClass="org.apache.cxf.systest.aegis.mtom.fortest.MtomTest">
 		<simple:dataBinding>
 			<bean
-				class="org.apache.cxf.aegis.databinding.AegisDatabinding">
-				<property name="mtomEnabled" value="true" />
-			</bean>
+				class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
 		</simple:dataBinding>
 		<simple:serviceBean>
 			<ref bean="mtomImpl" />



Mime
View raw message