cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1055161 - in /cxf/branches/2.3.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
Date Tue, 04 Jan 2011 19:40:18 GMT
Author: dkulp
Date: Tue Jan  4 19:40:18 2011
New Revision: 1055161

URL: http://svn.apache.org/viewvc?rev=1055161&view=rev
Log:
Merged revisions 1055152 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1055152 | dkulp | 2011-01-04 14:33:20 -0500 (Tue, 04 Jan 2011) | 1 line
  
  [CXF-3228] Honor the SAAJ encoding and write decl properties
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java?rev=1055161&r1=1055160&r2=1055161&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
Tue Jan  4 19:40:18 2011
@@ -46,10 +46,12 @@ import org.apache.cxf.binding.soap.saaj.
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor;
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.interceptor.StaxOutInterceptor;
 import org.apache.cxf.io.CachedOutputStream;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageContentsList;
 import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.service.model.BindingOperationInfo;
@@ -156,6 +158,23 @@ public class MessageModeOutInterceptor e
             if (soapMessage.countAttachments() > 0) {
                 message.put("write.attachments", Boolean.TRUE);
             }
+            try {
+                Object enc = soapMessage.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
+                if (enc instanceof String) {
+                    message.put(Message.ENCODING, enc);
+                }
+            } catch (SOAPException e) {
+                //ignore
+            }
+            try {
+                Object xmlDec = soapMessage.getProperty(SOAPMessage.WRITE_XML_DECLARATION);
+                if (xmlDec != null) {
+                    boolean b = MessageUtils.isTrue(xmlDec);
+                    message.put(StaxOutInterceptor.FORCE_START_DOCUMENT, b);
+                }
+            } catch (SOAPException e) {
+                //ignore
+            }
         }
         message.getInterceptorChain().add(internal);
     }



Mime
View raw message