cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1399988 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
Date Fri, 19 Oct 2012 07:25:42 GMT
Author: ffang
Date: Fri Oct 19 07:25:42 2012
New Revision: 1399988

URL: http://svn.apache.org/viewvc?rev=1399988&view=rev
Log:
Merged revisions 1399987 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

................
  r1399987 | ffang | 2012-10-19 15:18:52 +0800 (五, 19 10 2012) | 16 lines
  
  Merged revisions 1399985 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
  
  ................
    r1399985 | ffang | 2012-10-19 15:11:39 +0800 (五, 19 10 2012) | 9 lines
    
    Merged revisions 1399983 via svnmerge from 
    https://svn.apache.org/repos/asf/cxf/trunk
    
    ........
      r1399983 | ffang | 2012-10-19 15:02:16 +0800 (五, 19 10 2012) | 1 line
      
      [CXF-4584]org.w3c.dom.DOMException when sending soap11 request and returning soap12
response 
    ........
  ................
................

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

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.5.x-fixes:r1399987
  Merged /cxf/trunk:r1399983
  Merged /cxf/branches/2.6.x-fixes:r1399985

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

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java?rev=1399988&r1=1399987&r2=1399988&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/MessageModeOutInterceptor.java
Fri Oct 19 07:25:42 2012
@@ -28,6 +28,7 @@ import javax.activation.DataSource;
 import javax.xml.namespace.QName;
 import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPException;
+import javax.xml.soap.SOAPHeader;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.soap.SOAPPart;
 import javax.xml.stream.XMLStreamException;
@@ -38,6 +39,7 @@ import org.w3c.dom.DocumentFragment;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.attachment.AttachmentDeserializer;
+import org.apache.cxf.binding.soap.Soap12;
 import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
@@ -160,6 +162,22 @@ public class MessageModeOutInterceptor e
                 message.put("write.attachments", Boolean.TRUE);
             }
             try {
+                if (message instanceof org.apache.cxf.binding.soap.SoapMessage) {
+                    org.apache.cxf.binding.soap.SoapMessage cxfSoapMessage = 
+                            (org.apache.cxf.binding.soap.SoapMessage)message;
+                    String cxfNamespace = cxfSoapMessage.getVersion().getNamespace();
+                    SOAPHeader soapHeader = soapMessage.getSOAPHeader();
+                    String namespace = soapHeader == null ? null : soapHeader.getNamespaceURI();
+                    if (namespace != null && cxfNamespace != null && !namespace.equals(cxfNamespace)

+                            && Soap12.SOAP_NAMESPACE.equals(namespace)) {
+                        cxfSoapMessage.setVersion(Soap12.getInstance());
+                        cxfSoapMessage.put(Message.CONTENT_TYPE, cxfSoapMessage.getVersion().getContentType());
+                    }
+                }
+            } catch (SOAPException e) {
+                //ignore
+            }
+            try {
                 Object enc = soapMessage.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
                 if (enc instanceof String) {
                     message.put(Message.ENCODING, enc);



Mime
View raw message