cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject svn commit: r450715 - in /incubator/cxf/trunk/rt: bindings/soap/src/main/java/org/apache/cxf/binding/soap/ databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/
Date Thu, 28 Sep 2006 06:10:13 GMT
Author: tli
Date: Wed Sep 27 23:10:12 2006
New Revision: 450715

URL: http://svn.apache.org/viewvc?view=rev&rev=450715
Log:
CXF-76 minor fix

Modified:
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
    incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataWriter.java

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java?view=diff&rev=450715&r1=450714&r2=450715
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBinding.java
Wed Sep 27 23:10:12 2006
@@ -48,6 +48,9 @@
     }
 
     public Message createMessage(Message m) {
+        if (mtomEnabled) {
+            m.put(Message.MTOM_ENABLED, Boolean.TRUE);
+        }
         return new SoapMessage(m);
     }
 

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java?view=diff&rev=450715&r1=450714&r2=450715
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
(original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingFactory.java
Wed Sep 27 23:10:12 2006
@@ -74,9 +74,15 @@
 
     private Map cachedBinding = new HashMap<BindingInfo, Binding>();
 
+    private boolean mtomEnabled = true;
+    
     private Bus bus;
     private Collection<String> activationNamespaces;    
     
+    public SoapBindingFactory() {
+        System.out.println("Called create soap binding");
+    }
+    
     @Resource
     public void setBus(Bus b) {
         bus = b;
@@ -282,5 +288,14 @@
         }
 
         bmsg.addExtensor(bodyInfo);
+    }
+    
+    @Resource
+    public void setMtomEnabled(boolean mtomEnabled) {
+        this.mtomEnabled = mtomEnabled;
+    }
+
+    public boolean isMtomEnabled() {
+        return mtomEnabled;
     }    
 }

Modified: incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataWriter.java?view=diff&rev=450715&r1=450714&r2=450715
==============================================================================
--- incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataWriter.java
(original)
+++ incubator/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/MessageDataWriter.java
Wed Sep 27 23:10:12 2006
@@ -47,10 +47,10 @@
     public void write(Object obj, QName elName, Message output) {
         // if the mtom is enabled, we need to create the attachment mashaller
         JAXBAttachmentMarshaller am = null;
-        // if (output.containsKey(Message.MTOM_ENABLED)) {
-        am = new JAXBAttachmentMarshaller(output);
-        am.setXOPPackage(true);
-        // }
+        if (output.containsKey(Message.MTOM_ENABLED)) {
+            am = new JAXBAttachmentMarshaller(output);
+            am.setXOPPackage(true);
+        }
         Object source = null;
         XMLStreamWriter xsw = (XMLStreamWriter) output.getContent(XMLStreamWriter.class);
         if (xsw != null) {



Mime
View raw message