cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1178784 - in /cxf/branches/2.3.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
Date Tue, 04 Oct 2011 13:49:18 GMT
Author: dkulp
Date: Tue Oct  4 13:49:17 2011
New Revision: 1178784

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

................
  r1178548 | dkulp | 2011-10-03 15:56:49 -0400 (Mon, 03 Oct 2011) | 10 lines
  
  Merged revisions 1178546 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1178546 | dkulp | 2011-10-03 15:55:05 -0400 (Mon, 03 Oct 2011) | 2 lines
    
    [CXF-3813] Remove the soap specific attributes before unmarshalling the
    header to prevent validation errors.
  ........
................

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java

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

Modified: cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java?rev=1178784&r1=1178783&r2=1178784&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapHeaderInterceptor.java
Tue Oct  4 13:49:17 2011
@@ -28,6 +28,7 @@ import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.binding.soap.SoapMessage;
+import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.binding.soap.model.SoapHeaderInfo;
 import org.apache.cxf.headers.Header;
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
@@ -57,6 +58,7 @@ public class SoapHeaderInterceptor exten
 
     public void handleMessage(Message m) throws Fault {
         SoapMessage message = (SoapMessage) m;
+        SoapVersion soapVersion = message.getVersion();
         Exchange exchange = message.getExchange();
 
         MessageContentsList parameters = MessageContentsList.getContentsList(message);
@@ -99,6 +101,16 @@ public class SoapHeaderInterceptor exten
                     
                     if (param.getDataBinding() == null) {
                         Node source = (Node)param.getObject();
+                        if (source instanceof Element) {
+                            //need to remove these attributes as they
+                            //would cause validation failures
+                            Element el = (Element)source;
+                            
+                            el.removeAttributeNS(soapVersion.getNamespace(),
+                                              soapVersion.getAttrNameMustUnderstand());
+                            el.removeAttributeNS(soapVersion.getNamespace(),
+                                               soapVersion.getAttrNameRole());
+                        }
                         if (supportsNode) {
                             object = getNodeDataReader(message).read(mpi, source);
                         } else {



Mime
View raw message